Updated the init() function to correctly reject its promise when the connection to the server can't be established (the error callback I added is not showing in the diff for some reason).
Also replaced the call of callback() by errorCallback() further down to actually call the errorCallback when an error occurred (this was probably a bug).
Updated the
init()
function to correctly reject its promise when the connection to the server can't be established (the error callback I added is not showing in the diff for some reason). Also replaced the call ofcallback()
byerrorCallback()
further down to actually call the errorCallback when an error occurred (this was probably a bug).