Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: joyent/libuv
base: 739a5b25b570
Choose a base ref
...
head repository: joyent/libuv
compare: c53fe8154425
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on May 22, 2013

  1. unix: implicitly signal write errors to libuv user

    Fix an infinite loop in the example below when the stream encounters
    an EPIPE/ECONNRESET/etc. error:
    
        // keep writing until we start buffering
        while (stream->write_queue_size == 0) {
          uv_write_t* req = make_write_req();
          uv_buf_t buf = uv_buf_init("PING", 4);
          uv_write(req, stream, &buf, 1, write_cb);
        }
    
    uv_write() does not return an error code on write errors, the error is
    only reported to the callback.
    
    Before this commit, uv_write() left stream->write_queue_size untouched
    on error, meaning the caller had no way to find out about that error
    until the next tick of the event loop - which in the example above
    leads to an infinite loop because that next tick is indefinitely
    postponed.
    
    This commit works around that at the cost of some added internal
    complexity.
    
    Fixes nodejs/node-v0.x-archive#5516.
    bnoordhuis committed May 22, 2013
    Copy the full SHA
    c53fe81 View commit details
    Browse the repository at this point in the history