Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/guacamole-client/pull/252#discussion_r167408912
  
    --- Diff: 
guacamole-common/src/main/java/org/apache/guacamole/websocket/GuacamoleWebSocketTunnelEndpoint.java
 ---
    @@ -109,15 +113,15 @@ public void onOpen(final Session session, 
EndpointConfig config) {
                 // Get tunnel
                 tunnel = createTunnel(session, config);
                 if (tunnel == null) {
    -                closeConnection(session, 
GuacamoleStatus.RESOURCE_NOT_FOUND);
    +                closeConnection(session, 
GuacamoleStatus.RESOURCE_NOT_FOUND, null);
    --- End diff --
    
    Assuming that we do go the status code / WebSocket code route (ie: same as 
the HTTP case), the DRY approach here would be to overload `closeConnection()` 
with a variant which accepts only `GuacamoleStatus`, pulling the codes it needs 
from there.


---

Reply via email to