diff --git a/src/libnpsharp/RPC/RPCStream.cs b/src/libnpsharp/RPC/RPCStream.cs index c272639..52d17c6 100644 --- a/src/libnpsharp/RPC/RPCStream.cs +++ b/src/libnpsharp/RPC/RPCStream.cs @@ -149,7 +149,7 @@ namespace NPSharp.RPC public TRecv Read() { if (_sock == null) - throw new InvalidOperationException("You need to open the stream first."); + return null; var message = RPCMessage.Deserialize(_sock);