Skip to content

Commit c4c7e09

Browse files
committed
fix(collector): unhandled unlink error event
1 parent adfbb2b commit c4c7e09

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/collector.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,9 @@ Collector.prototype._send = function (logFile) {
248248
debug(err);
249249
}
250250

251-
fs.unlink(logFile);
251+
// do nothing if file cannot be removed
252+
// mostl likely it is because it was never created in the first place
253+
fs.unlink(logFile, function() {});
252254
});
253255

254256
});

0 commit comments

Comments
 (0)