Add logging in case websocket could not be created

This commit is contained in:
IQuant 2024-05-20 20:47:20 +03:00
parent 7912524498
commit 708a89de9f

View file

@ -265,7 +265,9 @@ impl NetManager {
.set_read_timeout(Some(Duration::from_millis(1)))
.expect("can set read timeout");
state.ws = accept(stream).ok();
state.ws = accept(stream)
.inspect_err(|e| error!("Could not init websocket: {}", e))
.ok();
if state.ws.is_some() {
info!("New stream connected");