Repository: incubator-ignite Updated Branches: refs/heads/ignite-709_2 0ac6a73a4 -> 07e5561ba
# IGNITE-709 Bug fix: don't wait for leaving topology if SPI was not started properly. Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/07e5561b Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/07e5561b Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/07e5561b Branch: refs/heads/ignite-709_2 Commit: 07e5561bac54c3171a9a86843fc6272eba2af2c0 Parents: 0ac6a73 Author: sevdokimov <[email protected]> Authored: Thu May 7 17:15:55 2015 +0300 Committer: sevdokimov <[email protected]> Committed: Thu May 7 17:15:55 2015 +0300 ---------------------------------------------------------------------- .../ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/07e5561b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java index c319f9e..9d437d1 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java @@ -303,14 +303,12 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp @Override public void spiStop() throws IgniteSpiException { timer.cancel(); - if (msgWorker.isAlive()) { // Should always be alive + if (msgWorker != null && msgWorker.isAlive()) { // Should always be alive msgWorker.addMessage(SPI_STOP); try { - if (!leaveLatch.await(netTimeout, MILLISECONDS)) { - if (log.isDebugEnabled()) - U.error(log, "Failed to left node: timeout [nodeId=" + locNode + ']'); - } + if (!leaveLatch.await(netTimeout, MILLISECONDS)) + U.warn(log, "Failed to left node: timeout [nodeId=" + locNode + ']'); } catch (InterruptedException ignored) { @@ -1000,7 +998,7 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp joinLatch.countDown(); - continue; + break; } }
