Skip to content

Commit

Permalink
If a check fails due to the connection dying, re-queue the post onto …
Browse files Browse the repository at this point in the history
…the check queue

Previously, post-checks would get lost if the connection failed
Ref #99
  • Loading branch information
animetosho committed Feb 24, 2024
1 parent 9a81b07 commit b22c5b4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/uploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,9 @@ Uploader.prototype = {
} else if(err.code == 'connect_fail' && self.skipErrs['connect-fail']) {
if(NNTP.log)
NNTP.log.error(err);
// this connection is dead, so re-queue the post to check on another connection
self.checkQueue.add(0, post);

var rtnErr = new Error('Internal Error');
rtnErr.code = 'kill_connection';
return cb(rtnErr);
Expand Down

0 comments on commit b22c5b4

Please sign in to comment.