opened
panmareksadowski
username_0
Hi,

Function UserAgentDelegate.onDisconnect(error?) passed by UserAgentOptions is not called when user stopped. I guess it should as UserAgent stops cause disconnect transport. And from documentation: ,,_Called upon transport transitioning from connected state._''. It looks UserAgentDelegate.onDisconnect(error?) is **only** called on transport error.
Function UserAgentDelegate.onDisconnect(error?) is not called after UserAgent Stopped
issue
created
john-e-riordan
username_1
Without addressing if it should or should not be called, he current behavior was done intentionally. After transitioning to `UserAgentState.Stopped`...
- `onConnect` will not be called
- `onDisconnect` will not be called
- additional incoming messages from the transport will not be processed
- no attempt will be made to reconnect the transport

One consideration is that the reconnection logic would needs to be aware that the UserAgent may be stopped which I suppose might be ok as long as the reconnection logic is at the UserAgent level or above?

Anyway, there is no bug in the current implementation. This could be a valid change to the API design however - needs more consideration.
comment
created
panmareksadowski
username_0
Ok, thank you for explication.
comment