#518: Close connection on end-of-stream.

This commit is contained in:
Michael Jumper
2014-02-03 11:54:04 -08:00
parent f57d2c167e
commit 76fce28d01
2 changed files with 12 additions and 1 deletions

View File

@@ -101,6 +101,8 @@ public abstract class GuacamoleWebSocketTunnelServlet extends WebSocketServlet {
try {
try {
// Attempt to read
while ((readMessage = reader.read()) != null) {
// Buffer message
@@ -113,6 +115,10 @@ public abstract class GuacamoleWebSocketTunnelServlet extends WebSocketServlet {
}
}
// No more data
connection.close(1001, null); // Shutdown
}
// Catch any thrown guacamole exception and attempt

View File

@@ -111,8 +111,9 @@ public abstract class GuacamoleWebSocketTunnelServlet extends WebSocketServlet {
try {
// Attempt to read
try {
// Attempt to read
while ((readMessage = reader.read()) != null) {
// Buffer message
@@ -125,6 +126,10 @@ public abstract class GuacamoleWebSocketTunnelServlet extends WebSocketServlet {
}
}
// No more data
outbound.close(Constants.STATUS_SHUTDOWN, null);
}
// Catch any thrown guacamole exception and attempt