removed unwraps on close socket
This commit is contained in:
parent
8572d89103
commit
3609b9a848
1 changed files with 2 additions and 2 deletions
|
@ -30,8 +30,8 @@ impl SocketState {
|
||||||
fn close_websocket(&mut self) {
|
fn close_websocket(&mut self) {
|
||||||
if let Some(ref mut x) = self.socket {
|
if let Some(ref mut x) = self.socket {
|
||||||
info!("closing websocket");
|
info!("closing websocket");
|
||||||
x.send_message(&Message::close()).unwrap();
|
let _ = x.send_message(&Message::close());
|
||||||
x.shutdown().unwrap();
|
let _ = x.shutdown();
|
||||||
self.socket = None;
|
self.socket = None;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue