Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Don't resend non-existing notifications #139

Closed
wants to merge 1 commit into from

2 participants

@Ecco

Fixes #138

@argon argon referenced this pull request from a commit
@argon Fixed a possible crasher as seen in #139 / #141
Credit: Romain Goyet (Ecco)
13de5d6
@argon argon closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 19, 2013
  1. Don't resend non-existing notifications

    Romain Goyet authored
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/connection.js
View
6 lib/connection.js
@@ -339,8 +339,10 @@ Connection.prototype.errorOccurred = function(socket, err) {
}
if(socket.busy) {
- // A notification was in flight. It should be buffered for resending.
- this.bufferNotification(socket.cachedNotifications[socket.cachedNotifications.length - 1]);
+ // A notification might have been in flight. If it is the case, it should be buffered for resending.
+ if (socket.cachedNotifications.length > 0) {
+ this.bufferNotification(socket.cachedNotifications[socket.cachedNotifications.length - 1]);
+ }
}
this.destroyConnection(socket);
Something went wrong with that request. Please try again.