Skip to content

Commit

Permalink
Comments on a previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
animetosho committed Dec 23, 2020
1 parent becc556 commit 3566234
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/nntp.js
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ NNTP.prototype = {
if(self._requests.length && self._requests[0].post && state == 'connected')
// if posting, can't pipeline on a QUIT message
self._end(cb);
else if(state == 'connecting' || state == 'closing') {
else if(state == 'connecting' || state == 'closing') { // probably shouldn't force destroy if 'closing', but I'm too lazy to wire things across nicely
self._destroy();
cb();
} else
Expand All @@ -584,7 +584,7 @@ NNTP.prototype = {
var self = this;
(function(cb) {
if(self.socket) {
if(self.state == 'connecting' || self.state == 'closing') {
if(self.state == 'connecting' || self.state == 'closing') { // probably shouldn't force destroy if 'closing', but I'm too lazy to wire things across nicely
self._destroy();
cb();
} else
Expand Down
2 changes: 1 addition & 1 deletion test/nntp.js
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ it('should not connect if destroyed straight after', function(done) {
], done);
});

it('should notify cancellation if ' + ef + '() during connection', function(done) {
it('should notify cancellation if ' + ef + '() whilst connecting', function(done) {
var server, client;

// simulate a connection timeout by hijacking the connect method, so that it does nothing on the first call
Expand Down

0 comments on commit 3566234

Please sign in to comment.