fix up url handling

This commit is contained in:
John Smith
2021-12-09 16:55:20 -05:00
parent 2f6237c5e6
commit feb54071f2
6 changed files with 62 additions and 55 deletions

View File

@@ -92,8 +92,8 @@ impl WebsocketProtocolHandler {
) -> Result<NetworkConnection, String> {
let url = dial_info.to_url_string(None);
let (tls, host, port, protocol_type) = match dial_info {
DialInfo::WS(ws) => (false, ws.fqdn.clone(), ws.port, ProtocolType::WS),
DialInfo::WSS(wss) => (true, wss.fqdn.clone(), wss.port, ProtocolType::WSS),
DialInfo::WS(ws) => (false, ws.host.clone(), ws.port, ProtocolType::WS),
DialInfo::WSS(wss) => (true, wss.host.clone(), wss.port, ProtocolType::WSS),
_ => return Err("wrong protocol for WebsocketProtocolHandler".to_owned()),
};