Is there any way to react to a client closing a connection? My use case is doing some heavy calculations on request and then sending a small result. I would like to immediately stop the calculations when the client closes the connection.
c
cy
02/07/2018, 12:42 PM
Sometimes you get Cancellation exception in handling coroutines
cy
02/07/2018, 12:43 PM
Unfortunately due to the nature of networking and http you can't get it guaranteed
cy
02/07/2018, 12:44 PM
Some of engines doesn't even provide any events about it
cy
02/07/2018, 12:44 PM
For example there is no simple way to do that with servlets
t
trathschlag
02/07/2018, 1:59 PM
Ok thanks for the info! I will use some explicit notifycation by client in combination with timeouts then.