@@ -60,7 +60,6 @@ struct Listener {
60
60
/// complete, all clones of the `Sender` are also dropped. This results in
61
61
/// `shutdown_complete_rx.recv()` completing with `None`. At this point, it
62
62
/// is safe to exit the server process.
63
- shutdown_complete_rx : mpsc:: Receiver < ( ) > ,
64
63
shutdown_complete_tx : mpsc:: Sender < ( ) > ,
65
64
}
66
65
@@ -128,7 +127,7 @@ pub async fn run(listener: TcpListener, shutdown: impl Future) {
128
127
// a receiver is needed, the subscribe() method on the sender is used to create
129
128
// one.
130
129
let ( notify_shutdown, _) = broadcast:: channel ( 1 ) ;
131
- let ( shutdown_complete_tx, shutdown_complete_rx) = mpsc:: channel ( 1 ) ;
130
+ let ( shutdown_complete_tx, mut shutdown_complete_rx) = mpsc:: channel ( 1 ) ;
132
131
133
132
// Initialize the listener state
134
133
let mut server = Listener {
@@ -137,7 +136,6 @@ pub async fn run(listener: TcpListener, shutdown: impl Future) {
137
136
limit_connections : Arc :: new ( Semaphore :: new ( MAX_CONNECTIONS ) ) ,
138
137
notify_shutdown,
139
138
shutdown_complete_tx,
140
- shutdown_complete_rx,
141
139
} ;
142
140
143
141
// Concurrently run the server and listen for the `shutdown` signal. The
@@ -181,7 +179,6 @@ pub async fn run(listener: TcpListener, shutdown: impl Future) {
181
179
// explicitly drop `shutdown_transmitter`. This is important, as the
182
180
// `.await` below would otherwise never complete.
183
181
let Listener {
184
- mut shutdown_complete_rx,
185
182
shutdown_complete_tx,
186
183
notify_shutdown,
187
184
..
0 commit comments