Skip to content

Commit

Permalink
Fixed CLEANUP() method.
Browse files Browse the repository at this point in the history
  • Loading branch information
petersirka committed Mar 7, 2024
1 parent 44f54bb commit 5fa79ab
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- added `FlowStreamInstance.stats {Object}` property
- registered a new global variable `Total` - alias for `F`
- fixed generating `Message-ID` in SMTP sender
- fixed `CLEANUP()` method

========================
0.0.95
Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2219,6 +2219,7 @@ function Framework() {
self.is4 = self.version = 4096;
self.version_header = '4';
self.version_node = process.version + '';
self.version_node2 = self.version_node.replace(/v|\./g, '').parseInt();
self.syshash = (__dirname + '-' + Os.hostname() + '-' + Os.platform() + '-' + Os.arch() + '-' + Os.release() + '-' + Os.tmpdir() + JSON.stringify(process.versions)).md5();
self.pref = global.PREF;
self.timestamp = Date.now().toString(36);
Expand Down
7 changes: 5 additions & 2 deletions internal.js
Original file line number Diff line number Diff line change
Expand Up @@ -2350,7 +2350,10 @@ function onFinished(stream, fn) {
stream.$onFinishedQueue = fn;

var callback = function() {
!stream.$onFinished && (stream.$onFinished = true);

if (!stream.$onFinished)
stream.$onFinished = true;

if (stream.$onFinishedQueue instanceof Array) {
while (stream.$onFinishedQueue.length)
stream.$onFinishedQueue.shift()();
Expand All @@ -2361,7 +2364,7 @@ function onFinished(stream, fn) {
}
};

if (isFinished(stream)) {
if (F.version_node2 < 1800 && isFinished(stream)) {
setImmediate(callback);
} else {

Expand Down

0 comments on commit 5fa79ab

Please sign in to comment.