mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-10-01 01:26:08 -04:00
more url fixes
This commit is contained in:
parent
feb54071f2
commit
7e967b22af
@ -869,9 +869,6 @@ impl Network {
|
||||
)
|
||||
};
|
||||
trace!("WS: starting listener at {:?}", listen_address);
|
||||
let (host, port) = split_port(&listen_address)
|
||||
.map_err(|_| "invalid WS listen address, port not specified correctly".to_owned())?;
|
||||
let port = port.ok_or_else(|| "port must be specified for WS address".to_owned())?;
|
||||
let addresses = self
|
||||
.start_tcp_listener(
|
||||
listen_address.clone(),
|
||||
@ -914,19 +911,14 @@ impl Network {
|
||||
|
||||
pub async fn start_wss_listeners(&self) -> Result<(), String> {
|
||||
let routing_table = self.routing_table();
|
||||
let (listen_address, url, path) = {
|
||||
let (listen_address, url) = {
|
||||
let c = self.config.get();
|
||||
(
|
||||
c.network.protocol.wss.listen_address.clone(),
|
||||
c.network.protocol.wss.url.clone(),
|
||||
c.network.protocol.wss.path.clone(),
|
||||
)
|
||||
};
|
||||
trace!("WSS: starting listener at {}", listen_address);
|
||||
let (host, port) = split_port(&listen_address)
|
||||
.map_err(|_| "invalid WSS listen address, port not specified correctly".to_owned())?;
|
||||
let port = port.ok_or_else(|| "port must be specified for WSS address".to_owned())?;
|
||||
|
||||
let _ = self
|
||||
.start_tcp_listener(
|
||||
listen_address.clone(),
|
||||
|
@ -145,7 +145,11 @@ impl WebsocketProtocolHandler {
|
||||
pub fn new(network_manager: NetworkManager, tls: bool, local_address: SocketAddr) -> Self {
|
||||
let config = network_manager.config();
|
||||
let c = config.get();
|
||||
let path = format!("GET {}", c.network.protocol.ws.path.trim_end_matches('/'));
|
||||
let path = if tls {
|
||||
format!("GET {}", c.network.protocol.ws.path.trim_end_matches('/'))
|
||||
} else {
|
||||
format!("GET {}", c.network.protocol.wss.path.trim_end_matches('/'))
|
||||
};
|
||||
let connection_initial_timeout = if tls {
|
||||
c.network.tls.connection_initial_timeout
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user