You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by "Nick Couchman (JIRA)" <ji...@apache.org> on 2017/11/08 18:53:00 UTC

[jira] [Commented] (GUACAMOLE-431) Tunnel implementations handles close only once

    [ https://issues.apache.org/jira/browse/GUACAMOLE-431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16244538#comment-16244538 ] 

Nick Couchman commented on GUACAMOLE-431:
-----------------------------------------

Thank you, Or.  This PR has been merged.

> Tunnel implementations handles close only once
> ----------------------------------------------
>
>                 Key: GUACAMOLE-431
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-431
>             Project: Guacamole
>          Issue Type: Bug
>          Components: guacamole-common-js
>    Affects Versions: 0.9.13-incubating
>            Reporter: Or Cohen
>            Priority: Minor
>
> Previously [asked on the mailing list|http://mail-archives.apache.org/mod_mbox/incubator-guacamole-dev/201708.mbox/browser]. Opening an issue to submit a PR.
> -------
> Tunnel implementations (WebSocket and HTTP) only handle the closing flow once. It's not that they're not re-usable, but if they are in a {{CLOSED}} state and another {{connect()}} call is issued, it doesn't handle the second failure properly. Making it impossible to automatically know about a subsequent error.
> On the second failure, the {{onerror}} and {{onstatechange}} callbacks are not called. For example, this is log output of the behavior:
> {noformat}
> // Connecting to a running proxy
> guac.onstatechange 1 STATE_CONNECTING
> guac.onstatechange 2 STATE_WAITING
> tunnel.onstatechange 1 OPEN
> guac.onstatechange 3 STATE_CONNECTED
> // Killing proxy/guacd
> tunnel.onerror Guacamole.Status {code: NaN, message: "Shutdown", isError: ƒ}
> tunnel.onstatechange 2 CLOSED
> Tunnel disconnected, place retry handling here
> // Reconnecting by calling connect on the same Client instance
> guac.onstatechange 1 STATE_CONNECTING
> guac.onstatechange 2 STATE_WAITING
> WebSocket connection to 'ws://localhost:8080/websocket..' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
> // No state change from tunnel, it will just hang like this
> {noformat}
> I was wondering how the Guacamole application handles this since it does work as expected. I saw that it doesn't really re-use the client, but creates a new one.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)