I’m using the SmartFox Client to connect to a remote server via a socket connection. When the server is shutdown, the EVENT.Close event fires correctly on all platforms (Windows, HTML5, macOS, iOS, etc…) except for Android. I’m currently using API 26.
The event listener is added in this class via the
init() function. I put a
trace("Socket closed") in
onSocketClose(), and the text is not output on Android.
The IOErrorEvent.IO_ERROR event fires properly, however. As a workaround, I added code within
onSocketIOError() to force the connection to disconnect for Android:
#if android disconnect(); #end
Any thoughts on why it may not be firing are appreciated.