Commit 526d8525 authored by Ben Taber's avatar Ben Taber Committed by Ben Noordhuis
Browse files

net: allow socket end before connect

Fix a bug where calling .end() on a socket without calling .connect() first
throws a TypeError:

  TypeError: Cannot read property 'shutdown' of undefined
      at Socket.onSocketFinish (net.js:194:20)
      at Socket.EventEmitter.emit (events.js:91:17)
      at Socket.Writable.end (_stream_writable.js:281:10)
      at Socket.end (net.js:352:31)

Fixes #4463.
parent 6ecb0cd6
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment