When using isolate the .fork would break because it had
no .disconnect method. This remove the exit handler there
would call .disconnect since it was not required.
It also change .disconnect to throw if the channel is closed,
this was not possible before because .disconnect would be called
twice.
If a timer callback throws and the user's uncaughtException handler ignores the
exception, other timers that expire on the current tick should still run.
If #2582 goes through, this hack should be removed.
Fixes#2631.
- throw if the ttl argument is not a number
- return the ttl argument (not particulary useful but it's what v0.4 did)
Note that the 0 < ttl < 256 check has *not* been reinstated. On Linux, -1 is a
valid argument to setsockopt(IPPROTO_IP, IP_TTL).
Change formatProperty in util.js to use Object.getOwnPropertyDescriptor
instead of __lookup[GS]etter__.
Use the cached value from the descriptor to reduce number of property
lookups from 3 to 1.
Fallback to standard lookup if the descriptor is empty. This doesn't
ever happen with normal JS objects (this function is called only when
the key exists) but apparently does with Node's custom ENV interface.
Fixes: #2109.
As RFC 2616 says we should, assume that servers will provide a persistent
connection by default.
> A significant difference between HTTP/1.1 and earlier versions of
> HTTP is that persistent connections are the default behavior of any
> HTTP connection. That is, unless otherwise indicated, the client
> SHOULD assume that the server will maintain a persistent connection,
> even after error responses from the server.
> HTTP/1.1 applications that do not support persistent connections MUST
> include the "close" connection option in every message.
Fixes#2436.
`path.exists*` functions show a deprecation warning and call functions
from `fs`. They should be removed later.
test: fix references to `path.exists*` in tests
test fs: add test for `fs.exists` and `fs.existsSync`
doc: reflect moving `path.exists*` to `fs`
uncaughtException handlers installed by the user override the default one that
the cluster module installs, the one that kills off the master process.
Fixes#2556.
Passing a non-buffer or non-string argument to Socket.prototype.write triggered
an assert:
Assertion failed: (Buffer::HasInstance(args[0])), function Write,
file ../src/stream_wrap.cc, line 289.
Fixes#2532.
With Upgrade or CONNECT request, http.ClientRequest emits 'close' event
after its socket is closed. However, after receiving a response, the socket
is not under management by the request.
http.ClientRequest should detach the socket before 'upgrade'/'connect'
event is emitted to pass the socket to a user. After that, it should
emit 'close' event immediately without waiting for closing of the socket.
Fixes#2510.