Fix for issue #30

This commit is contained in:
sta 2014-02-15 04:54:36 +09:00
parent 8448f0a30b
commit 488c25642c

View File

@ -1544,10 +1544,6 @@ namespace WebSocketSharp
internal void Send (Opcode opcode, Stream stream, Dictionary <CompressionMethod, Stream> cache)
{
lock (_forSend) {
lock (_forConn) {
if (_readyState != WebSocketState.OPEN)
return;
try {
Stream cached;
if (!cache.TryGetValue (_compression, out cached)) {
@ -1557,6 +1553,7 @@ namespace WebSocketSharp
else
cached.Position = 0;
if (_readyState == WebSocketState.OPEN)
sendFragmented (opcode, cached, Mask.UNMASK, _compression != CompressionMethod.NONE);
}
catch (Exception ex) {
@ -1565,7 +1562,6 @@ namespace WebSocketSharp
}
}
}
}
#endregion