[Modify] Polish it

This commit is contained in:
sta 2018-01-07 16:36:03 +09:00
parent 5878c2f715
commit 40d5046440

View File

@ -235,10 +235,16 @@ namespace WebSocketSharp.Net
/// </value> /// </value>
public Stream InputStream { public Stream InputStream {
get { get {
return _inputStream ?? if (!HasEntityBody)
(_inputStream = HasEntityBody return Stream.Null;
? _context.Connection.GetRequestStream (_contentLength, _chunked)
: Stream.Null); if (_inputStream == null) {
_inputStream = _context.Connection.GetRequestStream (
_contentLength, _chunked
);
}
return _inputStream;
} }
} }