GUAC-574: Only update active connections if socket not yet closed.

This commit is contained in:
Michael Jumper committed 2014-03-26 18:15:01 -07:00
1 parent b6ccf4c2f3
commit 7fa30998b2
1 file changed
+7 -4
@@ -87,12 +87,15 @@ public class MySQLGuacamoleSocket implements GuacamoleSocket {
@Override
public void close() throws GuacamoleException {
// Close socket
socket.close();
// Mark this connection as inactive
synchronized (activeConnectionMap) {
activeConnectionMap.closeConnection(historyID, connectionGroupID);
if (isOpen())
activeConnectionMap.closeConnection(historyID, connectionGroupID);
// Close socket
socket.close();
}
}