chr15m / bugout

Back end web app services over WebRTC.
https://chr15m.github.io/bugout
MIT License
603 stars 59 forks source link

Allow for async callback in rpc response handling #26

Closed woodgern closed 3 years ago

woodgern commented 4 years ago

Currently, when a response is being handled, the callback must be called before the before response function returns. This is because the response returns immidiately, and doesn't wait for the callback to be called.

To allow for async response handling, this simply waits for the callback to be called before returning.

Just some quick proof that the test case fails as specified in https://github.com/chr15m/bugout/issues/25

image

NW

chr15m commented 4 years ago

@woodgern fantastic, thanks for this. Will review & merge.

chr15m commented 3 years ago

@woodgern merged. Thank you very much for working out this fix, much appreciated. :pray: