handle liveview sockets disconnecting
This commit is contained in:
1 parent
e5e1abbdac
commit
1b53d4585e
2 files changed
+49
-8
No files matched your search
@@ -17,7 +17,9 @@ pub(crate) fn init(proxy: UnboundedSender<Template<'static>>) {
|
||||
Ok(_) => {
|
||||
let template: Template<'static> =
|
||||
serde_json::from_str(Box::leak(buf.into_boxed_str())).unwrap();
|
||||
proxy.send(template).unwrap();
|
||||
if proxy.send(template).is_err() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
Err(err) => {
|
||||
if err.kind() != std::io::ErrorKind::WouldBlock {
|
||||
|
||||
Reference in new issue
Block a user