Closed spaceisfun closed 4 years ago
Not an expert on how this is supposed to look so open to implementation suggestions, but this resolved the 100% repro of the ObjectDisposedException and seems reliable.
This still seems a bit unreliable, though it is better than before. I'm going to keep looking for a better solution.
Reopening PR. By creating an IDisposable wrapper class for the TcpClient and (tcp) Stream, they are always disposed of together, fixing the issue properly.
This is a proposed fix for https://github.com/jacqueskang/IpcServiceFramework/issues/158