Open cookie777 opened 2 years ago
Hi @cookie777, we have removed DispatchSemaphore in our latest version of SDK I.e. 2.0.15. However, if you think there is some scenario in which use of the Semaphore is essential then do let us know so that we can quickly revert our changes and merge your PR for the next build.
Hello @vikas-chandra-mnnit . I'm happy with removing DispatchSemaphore 👍 Thank you for your support!
@cookie777 Did the issue get resolved for you with the latest SDK ? As I'm still seeing this issue in the app
I havn't faced this issue after all transportToken.signal()
are removed from the code.
Issue
The current ble connection freezes if you try to connect (establish the session) to the device again.
Details
connect
function in. theESPDevice
, it works.Reason
The
DispatchSemaphore
doesn't callsignal()
when it catches errors.Details
connect
orsendData
fromESPDevice
, internally we allfunc SendConfigData
transportToken.wait()
and releases it when the process finishes.transportToken.signal()
is not called when the process ends with error.espressifPeripheral.writeValue
in the function, delegate functionsdidWriteValueFor
ordidUpdateValueFor
is called.Solution
Set
transportToken.signal()
in delegate functionsdidWriteValueFor
anddidUpdateValueFor
when it catches error.