I am working on a sfs2x project and I have encountered a critical problem on the client side API.
The use case is as follows:
1. george is connected to MyServer
2. MyServer is being rebooted for some reason
3. george get notified with connection lost event
4. george is trying to reconnect while the server has not started yet
5. george receives the following errors:
Code: Select all
Error opening URL 'http://graph.facebook.com/I/picture?type=square'
## SocketError: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2031: Socket Error. URL: localhost"]
Error opening URL 'http://localhost:8080/BlueBox/BlueBox.do'
## BlueBox Error: Error #2032: Stream Error. URL: http://localhost:8080/BlueBox/BlueBox.do
## SecurityError: [SecurityErrorEvent type="securityError" bubbles=false cancelable=false eventPhase=2 text="Error #2048: Security sandbox violation: file:///C|/Projects/BubbleWorldClient/bin/LobbyV1.swf cannot load data from localhost:443."]
6.Server is going back up
7.george's client is stuck due to error in section 5 and cannot reconnect to game, only way to use the client API is by closing the client and reload it again.
I have tried to handle this socket error / ioerror events it seems that nothing can catch them,
When this error happens it kills the client with no option to revive it,
is there anyway to handle this use case please?