[jboss-jira] [JBoss JIRA] (WFLY-4366) WebSocket Endpoint's onClose not always called on close

Stuart Douglas (JIRA) issues at jboss.org
Fri Feb 20 00:04:49 EST 2015


    [ https://issues.jboss.org/browse/WFLY-4366?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042227#comment-13042227 ] 

Stuart Douglas commented on WFLY-4366:
--------------------------------------

Is onError being called instead?

Browsers don't always send a close message when they are going away, which sometimes results in OnError being called instead of OnClose. 

If neither is being called then this is definitely a bug. 

> WebSocket Endpoint's onClose not always called on close
> -------------------------------------------------------
>
>                 Key: WFLY-4366
>                 URL: https://issues.jboss.org/browse/WFLY-4366
>             Project: WildFly
>          Issue Type: Bug
>          Components: Web Sockets
>    Affects Versions: 8.2.0.Final, 9.0.0.Alpha1
>            Reporter: Toby Crawley
>            Assignee: Stuart Douglas
>
> When closing the browser, my Endpoint's onClose handler isn't always
> called. I can recreate this by connecting to the Endpoint in 3-4
> browser tabs in a single window, then closing the window. I see
> onClose being triggered for 1-2 of the connections, but rarely for
> all.
> After the browser is closed, all of the Sessions that were created
> return false for isOpen.
> If I run a similar app in Undertow (1.1.0.Final) that uses a
> WebSocketChannel directly, I don't see this behavior -
> WebSocketChannel.onCloseMessage gets called for every connection,
> which leads me to believe the issue is somewhere in the jsr
> implementation.
> Let me know if you need any more details, or want me to test anything
> on my end.



--
This message was sent by Atlassian JIRA
(v6.3.11#6341)


More information about the jboss-jira mailing list