[undertow-dev] SSE close task

Nel Taurisson nel.taurisson at gmail.com
Mon Nov 23 16:31:35 EST 2015


Ok, thanks, here's the JIRA with a failing test attached as a patch:

https://issues.jboss.org/browse/UNDERTOW-589

Nel

2015-11-23 7:46 GMT+01:00 Stuart Douglas <sdouglas at redhat.com>:

> This sounds like a bug, can you file a JIRA?
>
> https://issues.jboss.org/projects/UNDERTOW
>
> Stuart
>
> ----- Original Message -----
> > From: "Nel Taurisson" <nel.taurisson at gmail.com>
> > To: undertow-dev at lists.jboss.org
> > Sent: Monday, 23 November, 2015 5:00:10 PM
> > Subject: [undertow-dev] SSE close task
> >
> > Hi,
> >
> > I'm playing with the SSE handler and I can't figure how the close task is
> > working. I thought the close task would be invoked when the client closes
> > the connection but it doesn't seem to be the case.
> >
> > I slightly modified the example code to register a close task when a
> > connection is initiated, here's the code :
> >
> > ServerSentEventConnectionCallback callback = new
> > ServerSentEventConnectionCallback() {
> > @Override
> > public void connected(ServerSentEventConnection connection, String
> > lastEventId) {
> > System.out.println("adding close task on connection...");
> > connection.addCloseTask(channel -> System.out.println("goodbye cruel
> > world..."));
> > }
> > };
> > final ServerSentEventHandler sseHandler =
> > Handlers.serverSentEvents(callback);
> >
> > It appears to me that the close task is only invoked when the server
> stops,
> > but now when the client closes. Is it the expected behavior ? If so, is
> > there any other way to be notified of a client disconnection ?
> >
> > Thanks a lot.
> >
> > Nel
> >
> >
> > _______________________________________________
> > undertow-dev mailing list
> > undertow-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/undertow-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20151123/60577821/attachment-0001.html 


More information about the undertow-dev mailing list