@@ -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
@@ -135,7 +134,7 @@ pub async fn run(listener: TcpListener, shutdown: impl Future) {
135
134
// a receiver is needed, the subscribe() method on the sender is used to create
136
135
// one.
137
136
let ( notify_shutdown, _) = broadcast:: channel ( 1 ) ;
138
- let ( shutdown_complete_tx, shutdown_complete_rx) = mpsc:: channel ( 1 ) ;
137
+ let ( shutdown_complete_tx, mut shutdown_complete_rx) = mpsc:: channel ( 1 ) ;
139
138
140
139
// Initialize the listener state
141
140
let mut server = Listener {
@@ -144,7 +143,6 @@ pub async fn run(listener: TcpListener, shutdown: impl Future) {
144
143
limit_connections : Arc :: new ( Semaphore :: new ( MAX_CONNECTIONS ) ) ,
145
144
notify_shutdown,
146
145
shutdown_complete_tx,
147
- shutdown_complete_rx,
148
146
} ;
149
147
150
148
// Concurrently run the server and listen for the `shutdown` signal. The
@@ -188,7 +186,6 @@ pub async fn run(listener: TcpListener, shutdown: impl Future) {
188
186
// explicitly drop `shutdown_transmitter`. This is important, as the
189
187
// `.await` below would otherwise never complete.
190
188
let Listener {
191
- mut shutdown_complete_rx,
192
189
shutdown_complete_tx,
193
190
notify_shutdown,
194
191
..
0 commit comments