Client closes the connection - SendResponse still works

Feb 22, 2012 at 4:17 PM

Hi - looking for a bit of guidance here.

We establish a session between the client and the server. The client closes the connection, then the server tries to SendResponse on the session. The SendResponse completes without error, however soon after the SessionClosed event fires and the server now knows about it.

The problem with this is that we assume the data has been sent to the client. Shouldn't the SendResponse error if the socket has been closed? 

I'd appreciate your thoughts on this as it poses us a problem as we have to mitigate against this.


Feb 22, 2012 at 4:17 PM

I'm using the Microsoft.ServiceModel.WebSockets.DesktopClient.dll as the client.

Feb 23, 2012 at 12:26 AM

It is the behavior of closing handshake which is defined in websocket protocol:

Feb 23, 2012 at 8:26 AM

Thanks - I think we'll build into our server / client an acknowledgement process, so the client can tell the server they've received the message.