@@ -14,7 +14,7 @@ use dap::server::{ServerReader, ServerWriter};
1414pub struct Connection {
1515 inbound_rx : mpsc:: Receiver < Request > ,
1616 outbound_tx : mpsc:: Sender < Sendable > ,
17- io_threads : IoThreads ,
17+ _io_threads : IoThreads ,
1818}
1919
2020struct IoThreads {
@@ -38,9 +38,11 @@ impl Connection {
3838 let ( inbound_tx, inbound_rx) = mpsc:: channel :: < Request > ( ) ;
3939 let ( outbound_tx, outbound_rx) = mpsc:: channel :: < Sendable > ( ) ;
4040
41- let io_threads = IoThreads :: spawn ( server_reader, server_writer, inbound_tx, outbound_rx) ;
42-
43- Ok ( Self { inbound_rx, outbound_tx, io_threads } )
41+ Ok ( Self {
42+ inbound_rx,
43+ outbound_tx,
44+ _io_threads : IoThreads :: spawn ( server_reader, server_writer, inbound_tx, outbound_rx) ,
45+ } )
4446 }
4547
4648 pub fn next_request ( & self ) -> Result < Request > {
@@ -80,10 +82,10 @@ impl IoThreads {
8082 }
8183}
8284
83- impl Drop for Connection {
85+ impl Drop for IoThreads {
8486 fn drop ( & mut self ) {
85- self . io_threads . reader . take ( ) . map ( |h| h. join ( ) ) ;
86- self . io_threads . writer . take ( ) . map ( |h| h. join ( ) ) ;
87+ self . reader . take ( ) . map ( |h| h. join ( ) ) ;
88+ self . writer . take ( ) . map ( |h| h. join ( ) ) ;
8789 }
8890}
8991
0 commit comments