RxBluetooth icon indicating copy to clipboard operation
RxBluetooth copied to clipboard

It crashes application if you unsubscribe before connection is establish

Open JustTrust opened this issue 7 years ago • 4 comments
trafficstars

In observeConnectDevice method you need to check if emitter is not disposed before send error or onNext. Please change this code emitter.onError(e) to next if (emitter.isDisposed.not()) emitter.onError(e)

JustTrust avatar Apr 10 '18 15:04 JustTrust

@IvBaranov are you still support this library?

JustTrust avatar Apr 16 '18 12:04 JustTrust

Sure, just don't have enough time right now.

IvBaranov avatar Apr 16 '18 12:04 IvBaranov

Thanks in advance, we will wait for updates )

JustTrust avatar Apr 17 '18 08:04 JustTrust

Instead of using if (emitter.isDisposed.not()) you can use just emtter.tryOnError(e)

radoslawlatka avatar Mar 06 '19 07:03 radoslawlatka