#518: Close connection on end-of-stream.
This commit is contained in:
1 parent
f57d2c167e
commit
76fce28d01
2 files changed
+12
-1
No files matched your search
+6
@@ -101,6 +101,8 @@ public abstract class GuacamoleWebSocketTunnelServlet extends WebSocketServlet {
|
|||||||
try {
|
try {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
// Attempt to read
|
||||||
while ((readMessage = reader.read()) != null) {
|
while ((readMessage = reader.read()) != null) {
|
||||||
|
|
||||||
// Buffer message
|
// 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
|
// Catch any thrown guacamole exception and attempt
|
||||||
|
|||||||
+6
-1
@@ -111,8 +111,9 @@ public abstract class GuacamoleWebSocketTunnelServlet extends WebSocketServlet {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
// Attempt to read
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
// Attempt to read
|
||||||
while ((readMessage = reader.read()) != null) {
|
while ((readMessage = reader.read()) != null) {
|
||||||
|
|
||||||
// Buffer message
|
// 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
|
// Catch any thrown guacamole exception and attempt
|
||||||
|
|||||||
Reference in new issue
Block a user