Without calling disconnect here, the session can end up in an endless loop. This happens when creating the session succeeded, but the activation failed.
After this explicit self.disconnect(), the session is able to recover and reconnect in the next attempt. Not sure if disconnect() is the best call for this, but it seems like a good option/solution. If not then please advice what can/should be used instead.
Without calling disconnect here, the session can end up in an endless loop. This happens when creating the session succeeded, but the activation failed.
See here some log output that shows an example of this happening: https://gist.github.com/svanharmelen/3f1e52374ccce8bf023dd37bee562a6e
After this explicit
self.disconnect()
, the session is able to recover and reconnect in the next attempt. Not sure ifdisconnect()
is the best call for this, but it seems like a good option/solution. If not then please advice what can/should be used instead.