Skip to content

Commit

Permalink
Preload file/stream reader if preload-modules requested
Browse files Browse the repository at this point in the history
  • Loading branch information
animetosho committed Dec 28, 2023
1 parent 155b1c1 commit 30be4ff
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bin/nyuu.js
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,13 @@ if(argv['preload-modules']) {
ulOpts.servers.forEach(function(server) {
if(server.secure) require('tls');
});

// preload these in case we need them
require('../lib/filereader');
require('../lib/streamreader');

// we won't consider modules loaded by the UploadManager constructor (zlib, nzbbuffer, bufferpool, procman) as 'too late', since it occurs before the 'start' event is fired, hence won't bother preloading these here
// same with StreamWriter and StreamTee (loaded before UploadManager)
}

// if doing raw posts, default keepMessageId to true
Expand Down

0 comments on commit 30be4ff

Please sign in to comment.