|
|
@ -159,8 +159,7 @@ pub fn listen(client_tx: mpsc::Sender<Notification>) { |
|
|
.with_settings(ws::Settings {
|
|
|
.with_settings(ws::Settings {
|
|
|
max_connections: 1,
|
|
|
max_connections: 1,
|
|
|
..ws::Settings::default()
|
|
|
..ws::Settings::default()
|
|
|
})
|
|
|
|
|
|
.build(|socket_tx| Handler {
|
|
|
|
|
|
|
|
|
}).build(|socket_tx| Handler {
|
|
|
client_tx: client_tx.clone(),
|
|
|
client_tx: client_tx.clone(),
|
|
|
socket_tx: socket_tx,
|
|
|
socket_tx: socket_tx,
|
|
|
});
|
|
|
});
|
|
|
@ -173,8 +172,7 @@ pub fn listen(client_tx: mpsc::Sender<Notification>) { |
|
|
.send(Notification::Error(format!(
|
|
|
.send(Notification::Error(format!(
|
|
|
"Unable to build websocket: {}",
|
|
|
"Unable to build websocket: {}",
|
|
|
e
|
|
|
e
|
|
|
)))
|
|
|
|
|
|
.unwrap();
|
|
|
|
|
|
|
|
|
))).unwrap();
|
|
|
return;
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
};
|
|
|
@ -189,8 +187,7 @@ pub fn listen(client_tx: mpsc::Sender<Notification>) { |
|
|
.send(Notification::Error(format!(
|
|
|
.send(Notification::Error(format!(
|
|
|
"Unable to listen on websocket: {}",
|
|
|
"Unable to listen on websocket: {}",
|
|
|
e
|
|
|
e
|
|
|
)))
|
|
|
|
|
|
.unwrap();
|
|
|
|
|
|
|
|
|
))).unwrap();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|