fix WebSocket.cs

This commit is contained in:
sta 2010-10-20 10:51:42 +09:00
parent e9d591b606
commit 6cd3f2ad91
21 changed files with 17 additions and 19 deletions

View File

@ -2,7 +2,7 @@
<MonoDevelop.Ide.Workspace ActiveConfiguration="Release_Ubuntu" ctype="Workspace" />
<MonoDevelop.Ide.Workbench ActiveDocument="websocket-sharp/WebSocket.cs" ctype="Workbench">
<Files>
<File FileName="websocket-sharp/WebSocket.cs" Line="5" Column="54" />
<File FileName="websocket-sharp/WebSocket.cs" Line="231" Column="1" />
</Files>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.DebuggingService.Breakpoints>

View File

@ -219,18 +219,16 @@ namespace WebSocketSharp
}
catch (Exception e)
{
if (OnError != null)
{
OnError(this, e.Message);
}
#if DEBUG
Console.WriteLine("WS: Error @close: {0}", e.Message);
#endif
}
}
if (!(Thread.CurrentThread.IsBackground) &&
msgThread != null && msgThread.IsAlive)
{
msgThread.Join();
}
if (wsStream != null)
{
wsStream.Dispose();
@ -362,8 +360,6 @@ namespace WebSocketSharp
msgNf.AddHint("append", "allowed");
#endif
while (readyState == WsState.OPEN)
{
while (readyState == WsState.OPEN && netStream.DataAvailable)
{
data = receive();
@ -372,7 +368,6 @@ namespace WebSocketSharp
OnMessage(this, data);
}
}
}
#if DEBUG
Console.WriteLine("WS: Info @message: Exit message method.");
#endif
@ -432,17 +427,20 @@ namespace WebSocketSharp
}
}
catch (Exception e)
{
if (readyState == WsState.OPEN)
{
if (OnError != null)
{
OnError(this, e.Message);
}
ReadyState = WsState.CLOSED;
ReadyState = WsState.CLOSING;
#if DEBUG
Console.WriteLine("WS: Error @receive: {0}", e.Message);
#endif
}
}
return null;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.