Commit Graph

2 Commits

Author SHA1 Message Date
Robert Nagy
2ccf15b2bf test: ensure finish is emitted before destroy
Adds a test to ensure that 'finish' is emitted
before the socket is destroyed by allow half-open
enforcer.

Refs: 3c07b1793c (commitcomment-38810268)

PR-URL: https://github.com/nodejs/node/pull/33137
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2020-06-25 01:11:14 +02:00
Robert Nagy
138eb32be1 net: wait for shutdown to complete before closing
When not allowing half open, handle.close would be
invoked before shutdown has been called and
completed causing a potential data race.

Fixes: https://github.com/nodejs/node/issues/32486#issuecomment-604072559

PR-URL: https://github.com/nodejs/node/pull/32491
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-04-01 13:05:10 +02:00