Skip to content

Commit ae08930

Browse files
committed
GH-800: use fn send_shutdown_signal_to_stream_reader in clean_up_dead_streams()
1 parent d81c2f0 commit ae08930

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

node/src/proxy_client/stream_handler_pool.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ impl StreamHandlerPoolReal {
483483
let mut inner = self.inner.lock().expect("Stream handler pool is poisoned");
484484
while let Ok((stream_key, sequence_number)) = self.stream_killer_rx.try_recv() {
485485
match inner.stream_writer_channels.remove(&stream_key) {
486-
Some(mut stream_senders) => {
486+
Some(stream_senders) => {
487487
debug!(
488488
Logger::new("TEST"),
489489
"clean_up_dead_streams() removed the stream key"
@@ -499,11 +499,11 @@ impl StreamHandlerPoolReal {
499499
data: vec![],
500500
})
501501
.expect("ProxyClient is dead");
502-
// TODO: GH-800: Perhaps you want the function that you created over here
503-
if let Err(_e) = stream_senders.reader_shutdown_tx.try_send(()) {
504-
debug!(inner.logger, "Unable to send a shutdown signal to the StreamReader for stream key {:?}. The channel is already gone.", stream_key)
505-
};
506-
// Test should have a fake server, and the (read and write should be different) server
502+
Self::send_shutdown_signal_to_stream_reader(
503+
stream_senders.reader_shutdown_tx,
504+
&stream_key,
505+
&inner.logger,
506+
);
507507
debug!(
508508
inner.logger,
509509
"Killed StreamWriter and StreamReader for the stream key {:?} to {} and sent server-drop report",

0 commit comments

Comments
 (0)