Skip to content

Commit

Permalink
Streams: BLEL2CAPInputStreamProxy: disconnect peripheral when L2CAP c…
Browse files Browse the repository at this point in the history
…hannel closes

This seems to help with rapid reconnections on slower devices (WiCAN, I'm looking at you).
  • Loading branch information
mickeyl committed May 5, 2024
1 parent 7a6a014 commit cc50c80
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ final class BLEL2CAPInputStreamProxy: ProxyInputStream {
super.init(proxying: inputStream)
}

#if DEBUG
deinit {
self.manager.cancelPeripheralConnection(self.peripheral)
#if DEBUG
print("\(self) destroyed")
}
#endif
}
}
#endif

0 comments on commit cc50c80

Please sign in to comment.