diff --git a/src/main/java/com/cloudhopper/smpp/impl/DefaultSmppClient.java b/src/main/java/com/cloudhopper/smpp/impl/DefaultSmppClient.java index c2850d4a..d19aa9fa 100644 --- a/src/main/java/com/cloudhopper/smpp/impl/DefaultSmppClient.java +++ b/src/main/java/com/cloudhopper/smpp/impl/DefaultSmppClient.java @@ -150,7 +150,9 @@ public void destroy() { // this.clientBootstrap.releaseExternalResources(); try { - clientChannel.closeFuture().sync(); + if (clientChannel != null) { + clientChannel.closeFuture().sync(); + } this.clientBootstrap = null; } catch (InterruptedException e) { logger.warn("Thread interrupted closing client channel.", e);