Our company provides a network component (DLL) for a GUI application.
It uses a timer that checks for disconnections. If he wants to reconnect, he calls:
internal void timClock_TimerCallback(object state) { lock (someLock) {
So the problem is that inside the DoConnect () procedure, a SocketException is thrown (and not caught). I would suggest that catch (Exception e) should catch ALL exceptions, but somehow the SocketException was not detected and is displayed in the GUI application.
protected void DoConnect() {
Doc has confirmed that SocketException extends the exception. Found stack appeared:
TcpClient.Connect() -> DoConnect() -> timClock_TimerCallback
Thus, an exception is not thrown outside the try / catch block.
Any ideas why this is not working?
source share