Appllication will not closed correctly
Posted: Fri Feb 24, 2017 6:56 am
Hallo,
I've written a script which is listing on a TCP port and wait until a client connect. This use the function "AcceptTcpClient" from the class TcpListener and run in a own Thread.
Until here there is no problem and works very well.
But when I close my application with the action "Close Application" from a Button, the thread will continue listening. This has the bad consequence, that the GUI is closed and the Application will not restart.
Is there a way to get notified like the "Created"-Event to stop all running threads in the background?
Greetings
Programmnix
I've written a script which is listing on a TCP port and wait until a client connect. This use the function "AcceptTcpClient" from the class TcpListener and run in a own Thread.
Until here there is no problem and works very well.
But when I close my application with the action "Close Application" from a Button, the thread will continue listening. This has the bad consequence, that the GUI is closed and the Application will not restart.
Is there a way to get notified like the "Created"-Event to stop all running threads in the background?
Greetings
Programmnix