Skip to content

Commit

Permalink
don't break when the queue is emptied
Browse files Browse the repository at this point in the history
  • Loading branch information
neonstalwart authored and kriszyp committed Jan 16, 2015
1 parent 9df55de commit 31808ef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion queue.js
Expand Up @@ -83,7 +83,9 @@ var connectionPrototype = {
leastRecentlyUsed.close();
}
leastRecentlyUsed = leastRecentlyUsed.next;
leastRecentlyUsed.previous = null;
if (leastRecentlyUsed) {
leastRecentlyUsed.previous = null;
}
}
}, 1000);
}
Expand Down

0 comments on commit 31808ef

Please sign in to comment.