shamblett / coap

A Coap package for dart
Other
16 stars 13 forks source link

fix: prevent premature cancellation of observerelation #192

Closed JKRhb closed 4 months ago

JKRhb commented 4 months ago

This PR should fix #190.

I noticed that the onCancel callback that has been added to the observe method in #188 was called a bit too early to allow for the delivery of incoming responses. This PR adds a boolean variable to track if the preparation of the CoapObserveClientRelation is already done, preventing the callback from early invocation.