File tree Expand file tree Collapse file tree 1 file changed +18
-22
lines changed Expand file tree Collapse file tree 1 file changed +18
-22
lines changed Original file line number Diff line number Diff line change @@ -148,26 +148,22 @@ async fn notify_task_nexus(
148
148
. unwrap ( ) ;
149
149
150
150
loop {
151
- let r = {
152
- if stored_notification. is_some ( ) {
153
- stored_notification. take ( )
154
- } else {
155
- tokio:: select! {
156
- biased;
157
-
158
- i = rx_high. recv( ) => i. map( |message| Notification {
159
- message,
160
- qos: NotifyQos :: High ,
161
- retries: 0 ,
162
- } ) ,
163
-
164
- i = rx_low. recv( ) => i. map( |message| Notification {
165
- message,
166
- qos: NotifyQos :: Low ,
167
- retries: 0 ,
168
- } ) ,
169
- }
170
- }
151
+ let r = tokio:: select! {
152
+ biased;
153
+
154
+ Some ( n) = async { stored_notification. take( ) } => Some ( n) ,
155
+
156
+ i = rx_high. recv( ) => i. map( |message| Notification {
157
+ message,
158
+ qos: NotifyQos :: High ,
159
+ retries: 0 ,
160
+ } ) ,
161
+
162
+ i = rx_low. recv( ) => i. map( |message| Notification {
163
+ message,
164
+ qos: NotifyQos :: Low ,
165
+ retries: 0 ,
166
+ } ) ,
171
167
} ;
172
168
173
169
let Some ( Notification {
@@ -208,8 +204,8 @@ async fn notify_task_nexus(
208
204
DownstairsClientStoppedReason :: ConnectionTimeout
209
205
}
210
206
ClientRunResult :: ConnectionFailed ( _) => {
211
- // skip this notification, it's too noisy during connection
212
- // retries
207
+ // skip this notification, it's too noisy during
208
+ // connection retries
213
209
//DownstairsClientStoppedReason::ConnectionFailed
214
210
continue ;
215
211
}
You can’t perform that action at this time.
0 commit comments