|
|
|
|
@ -791,21 +791,7 @@ namespace WebSocketSharp
|
|
|
|
|
else
|
|
|
|
|
releaseServerResources ();
|
|
|
|
|
|
|
|
|
|
if (_fragmentsBuffer != null) {
|
|
|
|
|
_fragmentsBuffer.Dispose ();
|
|
|
|
|
_fragmentsBuffer = null;
|
|
|
|
|
_inContinuation = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_receivePong != null) {
|
|
|
|
|
_receivePong.Close ();
|
|
|
|
|
_receivePong = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_exitReceiving != null) {
|
|
|
|
|
_exitReceiving.Close ();
|
|
|
|
|
_exitReceiving = null;
|
|
|
|
|
}
|
|
|
|
|
releaseCommonResources ();
|
|
|
|
|
|
|
|
|
|
var ret = sent && received;
|
|
|
|
|
_logger.Debug (
|
|
|
|
|
@ -1164,6 +1150,25 @@ namespace WebSocketSharp
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void releaseCommonResources ()
|
|
|
|
|
{
|
|
|
|
|
if (_fragmentsBuffer != null) {
|
|
|
|
|
_fragmentsBuffer.Dispose ();
|
|
|
|
|
_fragmentsBuffer = null;
|
|
|
|
|
_inContinuation = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_receivePong != null) {
|
|
|
|
|
_receivePong.Close ();
|
|
|
|
|
_receivePong = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_exitReceiving != null) {
|
|
|
|
|
_exitReceiving.Close ();
|
|
|
|
|
_exitReceiving = null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// As server
|
|
|
|
|
private void releaseServerResources ()
|
|
|
|
|
{
|
|
|
|
|
|