<p>I am using the DLL to tunnel RDP traffic using port forwarding. When disconnecting a session, I was getting a null reference exception from the dll. Eventually discovered it was coming from the ChannelDirectTcip.NET40.cs code file in the InternalSocketSend method. The problem was that because of the disconnect, this._socket was null, but the server was still sending data, and the dll was trying to relay that data to the nonexistent connection. To hack around this, I added code in the ChannelDirectTcpip.cs code file in the OnData method, to check for a null this._socket. If not null, call “this.InternalSocketSend(data);” as usual. If “this._socket” is null, call “this.SendMessage(new ChannelEofMessage(this.RemoteChannelNumber));” instead. Probably not the best solution, but it works.</p>
Comments: ** Comment from web user: olegkap **
Comments: ** Comment from web user: olegkap **
I will mark this error as fixed since I think it was fixed in latest release since this or simialr error apeared in few places.
Can you please test it and see if the error still occurs?
Thanks,
Oleg