[Modify] Replace it
This commit is contained in:
		@@ -968,6 +968,20 @@ namespace WebSocketSharp
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private void fatal (string message, Exception exception)
 | 
			
		||||
    {
 | 
			
		||||
      var code = exception is WebSocketException
 | 
			
		||||
                 ? ((WebSocketException) exception).Code
 | 
			
		||||
                 : CloseStatusCode.Abnormal;
 | 
			
		||||
 | 
			
		||||
      close (
 | 
			
		||||
        new CloseEventArgs (code, message ?? code.GetMessage ()),
 | 
			
		||||
        !code.IsReserved (),
 | 
			
		||||
        false,
 | 
			
		||||
        false
 | 
			
		||||
      );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private void init ()
 | 
			
		||||
    {
 | 
			
		||||
      _compression = CompressionMethod.None;
 | 
			
		||||
@@ -1558,7 +1572,8 @@ namespace WebSocketSharp
 | 
			
		||||
      _receivePong = new AutoResetEvent (false);
 | 
			
		||||
 | 
			
		||||
      Action receive = null;
 | 
			
		||||
      receive = () =>
 | 
			
		||||
      receive =
 | 
			
		||||
        () =>
 | 
			
		||||
          WebSocketFrame.ReadFrameAsync (
 | 
			
		||||
            _stream,
 | 
			
		||||
            false,
 | 
			
		||||
@@ -1579,7 +1594,11 @@ namespace WebSocketSharp
 | 
			
		||||
 | 
			
		||||
              message ();
 | 
			
		||||
            },
 | 
			
		||||
          ex => processException (ex, "An exception has occurred while receiving a message."));
 | 
			
		||||
            ex => {
 | 
			
		||||
              _logger.Fatal (ex.ToString ());
 | 
			
		||||
              fatal ("An exception has occurred while receiving.", ex);
 | 
			
		||||
            }
 | 
			
		||||
          );
 | 
			
		||||
 | 
			
		||||
      receive ();
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user