File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -209,15 +209,17 @@ impl<'a> MoneyLossDetector<'a> {
209
209
210
210
impl < ' a > Drop for MoneyLossDetector < ' a > {
211
211
fn drop ( & mut self ) {
212
- // Disconnect all peers
213
- for ( idx, peer) in self . peers . borrow ( ) . iter ( ) . enumerate ( ) {
214
- if * peer {
215
- self . handler . disconnect_event ( & Peer { id : idx as u8 , peers_connected : & self . peers } ) ;
212
+ if !:: std:: thread:: panicking ( ) {
213
+ // Disconnect all peers
214
+ for ( idx, peer) in self . peers . borrow ( ) . iter ( ) . enumerate ( ) {
215
+ if * peer {
216
+ self . handler . disconnect_event ( & Peer { id : idx as u8 , peers_connected : & self . peers } ) ;
217
+ }
216
218
}
217
- }
218
219
219
- // Force all channels onto the chain (and time out claim txn)
220
- self . manager . force_close_all_channels ( ) ;
220
+ // Force all channels onto the chain (and time out claim txn)
221
+ self . manager . force_close_all_channels ( ) ;
222
+ }
221
223
}
222
224
}
223
225
You can’t perform that action at this time.
0 commit comments