1. Jan 30, 2013
  2. Jan 29, 2013
    • isaacs's avatar
      Revert "net: Avoid tickDepth warnings on small writes" · bda45a8b
      isaacs authored
      This commit breaks simple/test-stream2-stderr-sync.  Need to figure out
      a better way, or just accept that `(function W(){stream.write(b,W)})()`
      is going to be noisy.  People should really be using the `'drain'` event
      for this use-case anyway.
      
      This reverts commit 02f7d1bf.
      bda45a8b
    • isaacs's avatar
      net: Avoid tickDepth warnings on small writes · 02f7d1bf
      isaacs authored
      Always defer the _write callback.  The optimization here was only
      relevant in some oddball edge cases that we don't actually care about.
      
      Our benchmarks confirm that just always deferring the Socket._write cb
      is perfectly fine to do, and in some cases, even slightly more
      performant.
      02f7d1bf
    • Bert Belder's avatar
      dgram: avoid EventEmitter leak warning · 6311f1c3
      Bert Belder authored
      When a datagram socket hasn't been bound yet, node will defer `send()`
      operations until binding has completed. Before this patch a `listening`
      listener would be installed every time `send` was called. This triggered
      an EventEmitter leak warning when more than 10 packets were sent in a
      tight loop. Therefore switch to using a single `listening` listener, and
      use an array to enqueue outbound packets.
      6311f1c3
    • Bert Belder's avatar
      cluster: support datagram sockets · 5e7e51c2
      Bert Belder authored
      5e7e51c2
    • Fedor Indutny's avatar
      child_process: move binding init in constructor · c13354e3
      Fedor Indutny authored
      Doing this in net.Socket constructor has much more overhead, and
      error is actually may happen before the construction of socket object.
      c13354e3
    • isaacs's avatar
      net: Initialize _connection, _handle in Socket ctor · 4c78a52a
      isaacs authored
      The better to reduce the hidden classes
      4c78a52a
    • isaacs's avatar
      http: Don't dump twice · faf78604
      isaacs authored
      faf78604
    • isaacs's avatar
      stream: Correct Transform class backpressure · e26622bd
      isaacs authored
      The refactor in b43e5441 to use
      stream.push() in Transform inadvertently caused it to immediately
      consume all the written data, regardless of whether or not the readable
      side was being consumed.
      
      Only pull data through the _transform() process when the readable side
      is being consumed.
      
      Fix #4667
      e26622bd
  3. Jan 28, 2013
    • Fedor Indutny's avatar
      net: initialize TCPWrap when receiving socket · 0d7a0216
      Fedor Indutny authored
      TCPWrap::Initialize() and PipeWrap::Initialize() should be called before
      any data will be read from received socket. But, because of lazy
      initialization of these bindings, Initialize() method isn't called.
      
      Init bindings manually upon socket receiving.
      
      See #4669
      0d7a0216
    • Ben Noordhuis's avatar
      test: move simple/test-http-dns-fail to test/internet · a39f669b
      Ben Noordhuis authored
      The test times out when the upstream DNS resolver takes too long to
      respond.
      
      See #4672.
      a39f669b
    • Ben Noordhuis's avatar
      test: fix pummel test out-of-memory errors · acd0df4a
      Ben Noordhuis authored
      Fix the following OOM error in pummel/test-net-connect-memleak
      and pummel/test-tls-connect-memleak:
      
        FATAL ERROR: CALL_AND_RETRY_0 Allocation failed - process out of
        memory
      
      Commit v8/v8@91afd39 increases the size of the deoptimization table
      to the extent that a 64M float array pushes it over the brink. Switch
      to SMIs so it stays below the limit.
      
      pummel/test-net-connect-memleak is still failing albeit with a different
      error this time. Needs further investigation.
      
        === release test-net-connect-memleak ===
        Path: pummel/test-net-connect-memleak
        -64 kB reclaimed
        assert.js:102
          throw new assert.AssertionError({
                ^
        AssertionError: false == true
            at done [as _onTimeout] (/home/bnoordhuis/src/nodejs/master/
        test/pummel/test-net-connect-memleak.js:48:3)
            at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)
            at process._makeCallback (node.js:306:20)
      acd0df4a
    • Ben Noordhuis's avatar
      buffer: fix Buffer::Copy regression from 00b4b7bb · 2e371b8f
      Ben Noordhuis authored
      If the end argument is omitted or not a number, make it default to
      the end of the buffer, not zero.
      
      Ideally, it should not matter what it defaults to because the JS shim
      in lib/buffer.js should handle that but there are still several places
      in node.js core that secrete SlowBuffers, hence Buffer::Copy() gets
      called without going through Buffer.prototype.copy() first.
      2e371b8f
    • Fedor Indutny's avatar
      stream_wrap: reference handle before uv_write2 · 0972acb5
      Fedor Indutny authored
      Revert commit 7f2a78bf and fix using
      empty symbol handle.
      0972acb5
  4. Jan 27, 2013
  5. Jan 26, 2013
  6. Jan 25, 2013
  7. Jan 24, 2013
    • isaacs's avatar
      test: Add test for negative stream drain counter · 5d3c51d9
      isaacs authored
      5d3c51d9
    • isaacs's avatar
      streams2: Handle sync read callbacks nicely · 782149dd
      isaacs authored
      782149dd
    • Raynos's avatar
      streams: Support objects other than Buffers · 444bbd4f
      Raynos authored
      We detect for non-string and non-buffer values in onread and
      turn the stream into an "objectMode" stream.
      
      If we are in "objectMode" mode then howMuchToRead will
      always return 1, state.length will always have 1 appended
      to it when there is a new item and fromList always takes
      the first value from the list.
      
      This means that for object streams, the n in read(n) is
      ignored and read() will always return a single value
      
      Fixed a bug with unpipe where the pipe would break because
      the flowing state was not reset to false.
      
      Fixed a bug with sync cb(null, null) in _read which would
      forget to end the readable stream
      444bbd4f
    • Ben Noordhuis's avatar
      gitignore: ignore v8.log files · 193320aa
      Ben Noordhuis authored
      193320aa