You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
still computing
still computing
still computing
still computing
still computing
11:22:32.672 [nettyWorkerPool-3-1] WARN io.netty.channel.DefaultChannelPipeline - An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
java.nio.channels.ClosedChannelException: null
at io.netty.channel.AbstractChannel$AbstractUnsafe.write(...)(Unknown Source)
still computing
still computing
still computing
still computing
still computing
still computing
...
And still computing keeps being printed.
I see no way to react to a closed connection. In my real example, I even have an expensive computation running, which I want to abort, as soon as the client closes the connection. By the way: If I change the loop to:
while (true) {
this.write("some,entry\n")
println("still computing")
this.flush()
}
The still computing messages stop immediately if I close the connection on the client side.
The text was updated successfully, but these errors were encountered:
If I run this application:
and then do a curl and exit at some point:
$ curl "localhost:8080/data" some,entry some,entry some,entry some,entry ^C $
The server outputs:
And
still computing
keeps being printed.I see no way to react to a closed connection. In my real example, I even have an expensive computation running, which I want to abort, as soon as the client closes the connection. By the way: If I change the loop to:
The
still computing
messages stop immediately if I close the connection on the client side.The text was updated successfully, but these errors were encountered: