diff options
author | Björn-Egil Dahlberg <[email protected]> | 2012-10-11 15:16:08 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2012-10-15 20:49:44 +0200 |
commit | 310354406aecba66ac0acbfd7d8ed8abb8bfcd5d (patch) | |
tree | c517627db9efb5c02f232454700d3b7654fa6fe1 | |
parent | 70c9312c4bd8832c31094dd076364077f0a684c5 (diff) | |
download | otp-310354406aecba66ac0acbfd7d8ed8abb8bfcd5d.tar.gz otp-310354406aecba66ac0acbfd7d8ed8abb8bfcd5d.tar.bz2 otp-310354406aecba66ac0acbfd7d8ed8abb8bfcd5d.zip |
erts: Search for heart in ports that are alive
-rw-r--r-- | erts/emulator/beam/io.c | 5 |
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; } |