Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/node_messaging.cc')
-rw-r--r--src/node_messaging.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_messaging.cc b/src/node_messaging.cc
index aac1245f269..6403950e9c8 100644
--- a/src/node_messaging.cc
+++ b/src/node_messaging.cc
@@ -980,7 +980,7 @@ void MessagePort::PostMessage(const FunctionCallbackInfo<Value>& args) {
// Even if the backing MessagePort object has already been deleted, we still
// want to serialize the message to ensure spec-compliant behavior w.r.t.
// transfers.
- if (port == nullptr) {
+ if (port == nullptr || port->IsHandleClosing()) {
Message msg;
USE(msg.Serialize(env, context, args[0], transfer_list, obj));
return;