Re-join channel when reconnecting

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra
2021-09-09 15:34:46 +02:00
co-authored by Nathan Sobo
parent 156fd4ba57
commit 8de18b5a84
5 changed files with 92 additions and 37 deletions
+3 -3
View File
@@ -72,12 +72,12 @@ impl Conn {
let rx = stream::select(
rx.map(Ok),
kill_rx.filter_map(|kill| {
if let Some(_) = kill {
if kill.is_none() {
future::ready(None)
} else {
future::ready(Some(Err(
Error::new(ErrorKind::Other, "connection killed").into()
)))
} else {
future::ready(None)
}
}),
);