diff --git a/.gitignore b/.gitignore index 7f275add..4f9ff8db 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,4 @@ target/ .classpath .project .settings/ - +.idea/ diff --git a/src/main/java/com/cloudhopper/smpp/impl/DefaultSmppSession.java b/src/main/java/com/cloudhopper/smpp/impl/DefaultSmppSession.java index 66ff11b7..c400fda5 100644 --- a/src/main/java/com/cloudhopper/smpp/impl/DefaultSmppSession.java +++ b/src/main/java/com/cloudhopper/smpp/impl/DefaultSmppSession.java @@ -516,6 +516,11 @@ public WindowFuture sendRequestPdu(PduRequest pd } } + if (!this.channel.isOpen()) { + logger.info("Channel closed."); + return; + } + // we need to log the PDU after encoding since some things only happen // during the encoding process such as looking up the result message if (configuration.getLoggingOptions().isLogPduEnabled()) {