Application close from console but remain in colibri monitor v1.6

I have created a c# socket console program and it works fine. suppose I close the exe from cmd. Next time when I open the exe there is socket error.

Usually this error occur when there are binding issue(most probably).When I see colibri moniter, exe is already there. It means exe was not closed before.

So How to manage this case?

Do you maybe have a thread that didn’t exit properly? You will have to catch event when you close the Window and finish all threads.