Skip to content

Commit 151a653

Browse files
Sunt-ingcarllerche
authored andcommitted
rm unused var
1 parent 999b570 commit 151a653

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/server.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ struct Listener {
6060
/// complete, all clones of the `Sender` are also dropped. This results in
6161
/// `shutdown_complete_rx.recv()` completing with `None`. At this point, it
6262
/// is safe to exit the server process.
63-
shutdown_complete_rx: mpsc::Receiver<()>,
6463
shutdown_complete_tx: mpsc::Sender<()>,
6564
}
6665

@@ -128,7 +127,7 @@ pub async fn run(listener: TcpListener, shutdown: impl Future) {
128127
// a receiver is needed, the subscribe() method on the sender is used to create
129128
// one.
130129
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);
132131

133132
// Initialize the listener state
134133
let mut server = Listener {
@@ -137,7 +136,6 @@ pub async fn run(listener: TcpListener, shutdown: impl Future) {
137136
limit_connections: Arc::new(Semaphore::new(MAX_CONNECTIONS)),
138137
notify_shutdown,
139138
shutdown_complete_tx,
140-
shutdown_complete_rx,
141139
};
142140

143141
// Concurrently run the server and listen for the `shutdown` signal. The
@@ -181,7 +179,6 @@ pub async fn run(listener: TcpListener, shutdown: impl Future) {
181179
// explicitly drop `shutdown_transmitter`. This is important, as the
182180
// `.await` below would otherwise never complete.
183181
let Listener {
184-
mut shutdown_complete_rx,
185182
shutdown_complete_tx,
186183
notify_shutdown,
187184
..

0 commit comments

Comments
 (0)