Open SamakaCD opened 1 year ago
Thank you for this pull request. I think the disconnect func will always has an error when there's NetworkCallback registered so it's better to just resolve it silently in catch instead of throwing an error. What do you think?
Need to investigate why it throws the error. I guess, that's because unregisterNetworkCallback
is called once the app connects. Why do we do so instead of bindProcessToNetwork
? I understand that there's a good reason for that since bindProcessToNetwork
was used previously.
Need to investigate why it throws the error. I guess, that's because
unregisterNetworkCallback
is called once the app connects. Why do we do so instead ofbindProcessToNetwork
? I understand that there's a good reason for that sincebindProcessToNetwork
was used previously.
Sorry I meant when you don't have a NetworkCallback registered it will always throws an error
It's pretty easy to get "NetworkCallback was not registered" error when disconnecting from a local network which is unhandled one. The PR handles it and rejects returned promise if it has been thrown.