forked from mincomk/rsh
add watch
This commit is contained in:
@@ -127,6 +127,9 @@ impl AuthedClient {
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
// Signal all pending callers that the connection is gone.
|
||||
pending_r.lock().await.clear();
|
||||
*events_tx_r.lock().await = None;
|
||||
});
|
||||
|
||||
Ok(Self {
|
||||
@@ -147,7 +150,7 @@ impl AuthedClient {
|
||||
.send(OpMsg::Req { id, body })
|
||||
.await
|
||||
.map_err(|_| anyhow!("send failed (connection closed)"))?;
|
||||
rx.await.map_err(|_| anyhow!("response dropped"))
|
||||
rx.await.map_err(|_| anyhow!("backend disconnected"))
|
||||
}
|
||||
|
||||
pub async fn req_stream(&self, body: OpReq) -> Result<(u64, mpsc::Receiver<OpResp>)> {
|
||||
|
||||
Reference in New Issue
Block a user