Server don't know socket connection was close by client In safari ( window & IOS )

Nov 2, 2012 at 7:05 AM

hi kerryjiang,

when client close connection by  ws.close();  ,

In firefox, server know this connection was close, and fire event SessionClosed,

But on safari, server didn't fire SessionClosed   ,  I ran safari on window & IOS, both get the same problem,  after that, on server, I send two message to client, the first message, the send function get no error, and the second message get error and server fire SessionClosed,

How can i solve this problem,

Thanks kerryjiang,

Coordinator
Nov 2, 2012 at 7:07 AM

Which version of SuperWebSocket are you using?

Nov 2, 2012 at 7:10 AM

SuperWebSocket : 0.6

Safari on Window : 5.1.7

IOS : 5.1.1

Regards,

Coordinator
Nov 2, 2012 at 7:11 AM

I'll try Safari on Windows to check this issue.

Nov 2, 2012 at 7:28 AM

thanks kerryjiang,

I'll wait for your reponse,

Nov 6, 2012 at 6:35 AM

hi kerryjiang,

I debug and see in   public void ProcessReceive(SocketAsyncEventArgs e)

 

// check if the remote host closed the connection
            if (e.BytesTransferred <= 0)
            {
                //Close(CloseReason.ClientClosing);
                return;
            }

 

some people comment Close code,

I'm uncomment and It's working now,

Regards,

Coordinator
Nov 6, 2012 at 3:18 PM

So, it's not a problem of SuperSocket/SuperWebSocket?

Nov 7, 2012 at 11:12 AM

yes,

Regards,