Skip to content

Commit

Permalink
Now with the blocking connection applying flow control, we get into s…
Browse files Browse the repository at this point in the history
…ituations where the connection can remained blocked, so avoid failing the connection if we can't verify a ping response due to remaining blocked.
  • Loading branch information
chirino committed May 24, 2016
1 parent 64a0f09 commit 2e7733b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,9 @@ public void run() {
// if the connection remained suspend we will never get the ping response..
// Looks like the user has forgoton to resume the connection
if (suspends == suspendChanges.get() && suspendCount.get() > 0) {
handleFatalFailure(new IllegalStateException("The connection has remained suspended for an extended period of time so it cannot do proper keep alive processing. Did you forget to resume the connection?"));
// Since the connection has been suspended, we can't really
// check to see if we are getting the ping responses.
mqtt.tracer.debug("The connection has remained suspended for an extended period of time so it cannot do proper keep alive processing. Did you forget to resume the connection?");
} else {
mqtt.tracer.debug("Ping timeout");
handleSessionFailure(new ProtocolException("Ping timeout").fillInStackTrace());
Expand Down

0 comments on commit 2e7733b

Please sign in to comment.