Fix deadlock in handle_send_to_dead_session test
The test called handle.join() without first calling handle.close(), causing the spawned session task to park forever waiting for cmd_rx.recv() to return None. Since join() borrows &self, cmd_tx stays alive, and the task never exits. Add close() call before join() to send a Close command and unblock the task. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -576,6 +576,7 @@ mod tests {
|
||||
let handle = Session::spawn(2, tcp_config());
|
||||
tokio::time::sleep(Duration::from_millis(200)).await;
|
||||
let _ = handle.send(b"data".to_vec()).await;
|
||||
let _ = handle.close().await;
|
||||
handle.join().await;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user