net: reset `errorEmitted` on reconnect
authorEd Umansky <edumansky@gmail.com>
Thu, 3 Jul 2014 00:59:28 +0000 (18:59 -0600)
committerFedor Indutny <fedor@indutny.com>
Thu, 3 Jul 2014 11:06:33 +0000 (15:06 +0400)
commitdf205360f5cdf3310a69748e74c636ec011d2e64
tree218dff632ac735aa635c0213ae35b2108ec4e964
parent803c3f0aa0fb7d41291abd93a2c6dea4dbee721a
net: reset `errorEmitted` on reconnect

Fix for `error` events emitting only once when reconnecting
a single instance of net.Socket.

Fixes joyent/node#7888

Signed-off-by: Fedor Indutny <fedor@indutny.com>
lib/net.js
test/simple/test-net-reconnect-error.js [new file with mode: 0644]