[Modify] Replace it

This commit is contained in:
sta 2021-01-05 21:36:08 +09:00
parent 5a3fc5f4cc
commit d7baef3c48

View File

@ -282,8 +282,12 @@ namespace WebSocketSharp.Net
/// </value>
public Stream InputStream {
get {
if (_inputStream == null)
_inputStream = getInputStream () ?? Stream.Null;
if (_inputStream == null) {
_inputStream = _contentLength > 0 || _chunked
? _connection
.GetRequestStream (_contentLength, _chunked)
: Stream.Null;
}
return _inputStream;
}