diff --git a/src/main/java/de/zalando/ep/zalenium/proxy/AutoStartProxySet.java b/src/main/java/de/zalando/ep/zalenium/proxy/AutoStartProxySet.java index 3f12e8b585..b373e98c02 100755 --- a/src/main/java/de/zalando/ep/zalenium/proxy/AutoStartProxySet.java +++ b/src/main/java/de/zalando/ep/zalenium/proxy/AutoStartProxySet.java @@ -206,12 +206,11 @@ public RemoteProxy remove(RemoteProxy proxy) { if (proxy instanceof DockerSeleniumRemoteProxy) { DockerSeleniumRemoteProxy dockerSeleniumRemoteProxy = (DockerSeleniumRemoteProxy) proxy; // Always try to remove the proxy from the pool - this will stop the container. - String proxyId = dockerSeleniumRemoteProxy.getId(); try { - LOGGER.debug("Stopping removed container [{}", proxyId); - starter.stopContainer(proxyId); + LOGGER.debug("Stopping removed container [{}", dockerSeleniumRemoteProxy.getId()); + starter.stopContainer(dockerSeleniumRemoteProxy.getContainerId()); } catch (Exception e) { - LOGGER.error("Failed to stop container [" + proxyId + "].", e); + LOGGER.error("Failed to stop container [" + dockerSeleniumRemoteProxy.getId() + "].", e); } } return super.remove(proxy);