[Modify] Polish it

This commit is contained in:
sta 2015-12-28 15:20:34 +09:00
parent 752da8a7f5
commit d7a6d822af

View File

@ -1041,18 +1041,13 @@ namespace WebSocketSharp
private void open () private void open ()
{ {
_inMessage = true; _inMessage = true;
startReceiving ();
try { try {
startReceiving (); OnOpen.Emit (this, EventArgs.Empty);
try {
OnOpen.Emit (this, EventArgs.Empty);
}
catch (Exception ex) {
_logger.Error (ex.ToString ());
error ("An exception has occurred during the OnOpen event.", ex);
}
} }
catch (Exception ex) { catch (Exception ex) {
processException (ex, "An exception has occurred while opening."); _logger.Error (ex.ToString ());
error ("An exception has occurred during the OnOpen event.", ex);
} }
MessageEventArgs e = null; MessageEventArgs e = null;