Skip to content

Commit

Permalink
Add port number fallback
Browse files Browse the repository at this point in the history
A bug somewhere leads to opts.connect having null in the port field
  • Loading branch information
po5 committed Jun 11, 2024
1 parent 893f0ef commit c2c484c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/nntp.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ function NNTP(opts, rawSpeedTracker) {
readableHighWaterMark: 0, // disable buffering
writableHighWaterMark: 1 // Node 20 seems to go wonky with a value of 0, so use 1 instead
}, opts.connect);
if (!connectOpts.port) connectOpts.port = opts.secure ? 563 : 119;
// although the feature was added in node 12.10.0, it's crashy on Linux until 13.13.0 / 12.16.3
// reported as unstable on 15.7.0, so we'll disable it everywhere until we get more info on it: https://github.com/animetosho/Nyuu/issues/87
var supportsOnread = false;
Expand Down

0 comments on commit c2c484c

Please sign in to comment.