]> git.lizzy.rs Git - rust.git/commit
rustuv: Fix a tcp connect timeout bug on windows
authorAlex Crichton <alex@alexcrichton.com>
Sun, 20 Apr 2014 04:39:30 +0000 (21:39 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Sun, 20 Apr 2014 04:39:30 +0000 (21:39 -0700)
commit5bfb260cf87b4907f885877d5ac4e819edb970db
tree47e32efe5943f689e925561b06541e9778ee4fe3
parent7b6e7ebe73b5f046faa81406ed58866364f6cfee
rustuv: Fix a tcp connect timeout bug on windows

When a uv_tcp_t is closed in libuv, it will still invoke the pending connect_cb,
and I thought that it would always call it with ECANCELED, but it turns out that
sometimes we'll get a different error code instead. Handle this case by checking
to see if the request's data is NULL and bail out if so (the timeout expired).
src/librustuv/net.rs