From fa502b0e1ea91bbd971c311df1b647036a9c11bc Mon Sep 17 00:00:00 2001 From: sta Date: Mon, 26 Feb 2018 17:58:09 +0900 Subject: [PATCH] [Modify] Polish it --- websocket-sharp/Net/HttpConnection.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/websocket-sharp/Net/HttpConnection.cs b/websocket-sharp/Net/HttpConnection.cs index 5ad2763f..de78400e 100644 --- a/websocket-sharp/Net/HttpConnection.cs +++ b/websocket-sharp/Net/HttpConnection.cs @@ -538,11 +538,11 @@ namespace WebSocketSharp.Net { // TODO: Can we get this stream before reading the input? - if (_outputStream != null || _socket == null) - return _outputStream; - lock (_sync) { if (_socket == null) + return null; + + if (_outputStream != null) return _outputStream; var lsnr = _context.Listener;