sshnet / SSH.NET

SSH.NET is a Secure Shell (SSH) library for .NET, optimized for parallelism.
MIT License
3.87k stars 915 forks source link

Tweak AsyncSocketListener in tests #1382

Closed Rob-Hague closed 1 month ago

Rob-Hague commented 1 month ago

Some CI runs have been crashing lately from within AsyncSocketListener. This moves a bit of disconnection & exception handling around. It probably won't fix the underlying tests which would have otherwise failed, but it might stop the process from outright crashing.

Also reference the same code for the integration tests.

WojciechNagorski commented 1 month ago

This is a very difficult piece of code. Sockets will behave differently on Linux and Windows and in the .NET Framework and modern .NET. In addition, different tests use the AsyncSocketListener differently. But I agree that it should be a little easier.

Rob-Hague commented 1 month ago

Yeah, I figured this at least removes one way of crashing. There might still be more