class ClientConnectionService {

    public synchronized void close(final ClientConnection connection) {
        final String deviceIdentification = connection.getConnectionParameters().getDeviceIdentification();
        if (connection instanceof DeviceConnection) {

            this.iec60870Client.disconnect(connection);

            this.connectionCache.removeConnection(deviceIdentification);

        } else {
            LOGGER.warn("No connection found for deviceIdentification {}", deviceIdentification);
        }
    }

}