How can I handle remote connection closing

tehsu

New member
Joined
Mar 1, 2018
Messages
1
Programming Experience
Beginner
I wrote a windows service that works as expected except for I'm not sure how to handle when an exception occurs, for example, I am using SSH.NET library to open a tunnel and the tunnel is active but when I close the connection on the remote side, the service continues to run, i ran the debugger and then did a break all and it seems to be stuck in Program.cs on the following,
Code:
ServiceBase.Run(ServicesToRun);
I'm a little stuck on where to go and would appreciate any insight on what I may be missing.

Thanks
 
Top Bottom