Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.IllegalStateException: Response is closed after browser refresh. #13

Open
moxit0 opened this issue Feb 26, 2018 · 1 comment

Comments

@moxit0
Copy link

moxit0 commented Feb 26, 2018

Hi,
first I have to say my admiration for the work you have done. I am using your Vertx SSE implementation to show notification coming from MQTT topic on the client (Angular 5). In general following you examples I set up a SSEHandler and everything works except in case of browser refresh. If you refresh the browser while client and server are connected exception on the server side is thrown:
SEVERE: Unhandled exception java.lang.IllegalStateException: Response is closed at io.vertx.core.http.impl.HttpServerResponseImpl.checkValid(HttpServerResponseImpl.java:547) at io.vertx.core.http.impl.HttpServerResponseImpl.write(HttpServerResponseImpl.java:573) at io.vertx.core.http.impl.HttpServerResponseImpl.write(HttpServerResponseImpl.java:296) at io.vertx.core.http.impl.HttpServerResponseImpl.write(HttpServerResponseImpl.java:52) at io.vertx.ext.web.handler.sse.impl.SSEConnectionImpl.writeHeader(SSEConnectionImpl.java:143) at io.vertx.ext.web.handler.sse.impl.SSEConnectionImpl.withHeader(SSEConnectionImpl.java:131) at io.vertx.ext.web.handler.sse.impl.SSEConnectionImpl.retry(SSEConnectionImpl.java:71) at io.vertx.ext.web.handler.sse.impl.SSEHandlerImpl.lambda$handle$0(SSEHandlerImpl.java:37) at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl.java:339) at io.netty.util.concurrent.AbstractEventExecutor.safeExecute$$$capture(AbstractEventExecutor.java:163) at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java) at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Thread.java:748)

then new data is no able to be delivered to the client throw SSE. Have you run into such issue and do you have any clue for a workaround.

@aesteve
Copy link
Owner

aesteve commented Jan 27, 2019

Can you try with the last version of the codebase ?

I think I fixed it because I faced it, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants