<div dir="ltr"><div>Ok, thanks, here's the JIRA with a failing test attached as a patch:<br></div><div><br></div><a href="https://issues.jboss.org/browse/UNDERTOW-589">https://issues.jboss.org/browse/UNDERTOW-589</a><br><div class="gmail_extra"><br></div><div class="gmail_extra">Nel</div><div class="gmail_extra"><br><div class="gmail_quote">2015-11-23 7:46 GMT+01:00 Stuart Douglas <span dir="ltr"><<a href="mailto:sdouglas@redhat.com" target="_blank">sdouglas@redhat.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This sounds like a bug, can you file a JIRA?<br>
<br>
<a href="https://issues.jboss.org/projects/UNDERTOW" rel="noreferrer" target="_blank">https://issues.jboss.org/projects/UNDERTOW</a><br>
<br>
Stuart<br>
<div><div class="h5"><br>
----- Original Message -----<br>
> From: "Nel Taurisson" <<a href="mailto:nel.taurisson@gmail.com">nel.taurisson@gmail.com</a>><br>
> To: <a href="mailto:undertow-dev@lists.jboss.org">undertow-dev@lists.jboss.org</a><br>
> Sent: Monday, 23 November, 2015 5:00:10 PM<br>
> Subject: [undertow-dev] SSE close task<br>
><br>
> Hi,<br>
><br>
> I'm playing with the SSE handler and I can't figure how the close task is<br>
> working. I thought the close task would be invoked when the client closes<br>
> the connection but it doesn't seem to be the case.<br>
><br>
> I slightly modified the example code to register a close task when a<br>
> connection is initiated, here's the code :<br>
><br>
> ServerSentEventConnectionCallback callback = new<br>
> ServerSentEventConnectionCallback() {<br>
> @Override<br>
> public void connected(ServerSentEventConnection connection, String<br>
> lastEventId) {<br>
> System.out.println("adding close task on connection...");<br>
> connection.addCloseTask(channel -> System.out.println("goodbye cruel<br>
> world..."));<br>
> }<br>
> };<br>
> final ServerSentEventHandler sseHandler =<br>
> Handlers.serverSentEvents(callback);<br>
><br>
> It appears to me that the close task is only invoked when the server stops,<br>
> but now when the client closes. Is it the expected behavior ? If so, is<br>
> there any other way to be notified of a client disconnection ?<br>
><br>
> Thanks a lot.<br>
><br>
> Nel<br>
><br>
><br>
</div></div>> _______________________________________________<br>
> undertow-dev mailing list<br>
> <a href="mailto:undertow-dev@lists.jboss.org">undertow-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/undertow-dev</a><br>
</blockquote></div><br></div></div>