Skip to content

Commit

Permalink
Set ws-clients to blocking mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
H-M-H committed May 1, 2020
1 parent 472337b commit 10ad148
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/websocket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,9 @@ fn listen_websocket<T, F>(
return;
}
let client = client.unwrap();
if let Err(err) = client.set_nonblocking(false) {
warn!("Failed to set client to blocking mode: {}", err);
}
let peer_addr = client.peer_addr();
if let Err(err) = peer_addr {
sender.send(Ws2GuiMessage::Warning(format!(
Expand Down

0 comments on commit 10ad148

Please sign in to comment.