We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f70017 commit c45623aCopy full SHA for c45623a
src/node_file.cc
@@ -172,13 +172,11 @@ inline void FileHandle::Close() {
172
// to notify that the file descriptor was gc'd. We want to be noisy about
173
// this because not explicitly closing the FileHandle is a bug.
174
env()->SetUnrefImmediate([](Environment* env, void* data) {
175
- char msg[70];
176
err_detail* detail = static_cast<err_detail*>(data);
177
- snprintf(msg, arraysize(msg),
178
- "Closing file descriptor %d on garbage collection",
179
- detail->fd);
+ ProcessEmitWarning(env,
+ "Closing file descriptor %d on garbage collection",
+ detail->fd);
180
delete detail;
181
- ProcessEmitWarning(env, msg);
182
}, detail);
183
}
184
0 commit comments