src/main/java/org/geppetto/frontend/controllers/ConnectionsManager.java
public void removeConnection(WebsocketConnection websocketConnection)
	{
		if(_connections.contains(websocketConnection))
		{
			if(websocketConnection.getConnectionID() != null)
			{
				_connections.remove(websocketConnection.getConnectionID());
			}
			else
			{
				//TODO Sometimes for some reason the websocketConnection has null as ID, need to investigate more
				String toRemove = null;
				for(String key : _connections.keySet())
				{
					if(_connections.get(key).equals(websocketConnection))
					{
						toRemove = key;
						break;
					}
				}
				if(toRemove != null)
				{
					_connections.remove(toRemove);
				}
			}
			_logger.info("Websocket connection removed " + websocketConnection.getConnectionID());
		}
	}
/**
	 * Remove connection from list of current ones.
	 * 
	 * @param websocketConnection
	 *            - Connection to be removed
	 */
Remove connection from list of current ones.

@param websocketConnection
- Connection to be removed
Remove connection from list of current ones . @param websocketConnection - Connection to be removed
public void removeConnection(WebsocketConnection websocketConnection)
	{
		if(_connections.contains(websocketConnection))
		{
			if(websocketConnection.getConnectionID() != null)
			{
				_connections.remove(websocketConnection.getConnectionID());
			}
			else
			{
				String toRemove = null;
				for(String key : _connections.keySet())
				{
					if(_connections.get(key).equals(websocketConnection))
					{
						toRemove = key;
						break;
					}
				}
				if(toRemove != null)
				{
					_connections.remove(toRemove);
				}
			}
			_logger.info("Websocket connection removed " + websocketConnection.getConnectionID());
		}
	}
public void removeConnection ( WebsocketConnection websocketConnection ) { if ( _connections . contains ( websocketConnection ) ) { if ( websocketConnection . getConnectionID ( ) != null ) { _connections . remove ( websocketConnection . getConnectionID ( ) ) ; } else { String toRemove = null ; for ( String key : _connections . keySet ( ) ) { if ( _connections . get ( key ) . equals ( websocketConnection ) ) { toRemove = key ; break ; } } if ( toRemove != null ) { _connections . remove ( toRemove ) ; } } _logger . info ( "Websocket connection removed " + websocketConnection . getConnectionID ( ) ) ; } }
Remove connection from list of current ones.
Remove connection from list of current ones .
//TODO Sometimes for some reason the websocketConnection has null as ID, need to investigate more