mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 05:31:22 +00:00
#518: Close connection on end-of-stream.
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user