aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--erts/emulator/beam/io.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/erts/emulator/beam/io.c b/erts/emulator/beam/io.c
index 502ded4eca..88e9215a9c 100644
--- a/erts/emulator/beam/io.c
+++ b/erts/emulator/beam/io.c
@@ -5248,7 +5248,10 @@ Port *erts_get_heart_port() {
for(ix = 0; ix < erts_max_ports; ix++) {
port = &erts_port[ix];
- /* immediate compare */
+ /* only examine undead or alive ports */
+ if (port->status & ERTS_PORT_SFLGS_DEAD)
+ continue;
+ /* immediate atom compare */
if (port->reg && port->reg->name == am_heart_port) {
return port;
}