File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,11 @@ impl Drop for Client {
149149 . get_mut ( )
150150 . expect ( "notification handle cache lock was poisoned" ) ;
151151
152+ // Close all open notification handles.
153+ for ( addr, handle) in std:: mem:: take ( handles) {
154+ let _ = self . device ( addr) . delete_notification ( handle) ;
155+ }
156+
152157 if let Ok ( ref mut socket) = self . socket . lock ( ) {
153158 // Remove our port from the router, if necessary.
154159 if self . source_port_opened {
@@ -161,11 +166,6 @@ impl Drop for Client {
161166 }
162167
163168 self . receiver . stop ( ) ;
164-
165- // Close all open notification handles.
166- for ( addr, handle) in std:: mem:: take ( handles) {
167- let _ = self . device ( addr) . delete_notification ( handle) ;
168- }
169169 }
170170}
171171
You can’t perform that action at this time.
0 commit comments