diff --git a/CoreRemoting/RemotingSession.cs b/CoreRemoting/RemotingSession.cs index 028bb52..43e181f 100644 --- a/CoreRemoting/RemotingSession.cs +++ b/CoreRemoting/RemotingSession.cs @@ -122,6 +122,9 @@ internal RemotingSession(int keySize, byte[] clientPublicKey, IRemotingServer se _remoteDelegateInvocationEventAggregator.RemoteDelegateInvocationNeeded += (_, uniqueCallKey, handlerKey, arguments) => { + if (_isDisposing) + return null; + var sharedSecret = MessageEncryption ? _sessionId.ToByteArray()