I've been getting the UV_EBADF error when running IO through http ( libcurl ) to an Azure blob page. I'm using libuv-1.29.1-1.fc28.x86_64. I've tracked it down to where it originated but now I am stuck. Any suggestions on how to proceed would be appreciated.
static void uv__poll_io(uv_loop_t* loop, uv__io_t* w, unsigned int
events) { uv_poll_t* handle;
int pevents;
handle = container_of(w, uv_poll_t, io_watcher);
/*
* As documented in the kernel source fs/kernfs/file.c #780
* poll will return POLLERR|POLLPRI in case of sysfs
* polling. This does not happen in case of out-of-band
* TCP messages.
*
* The above is the case on (at least) FreeBSD and Linux.
*
* So to properly determine a POLLPRI or a POLLERR we need
* to check for both.
*/
if ((events & POLLERR) && !(events & UV__POLLPRI)) {
uv__io_stop(loop, w, POLLIN | POLLOUT | UV__POLLRDHUP |
UV__POLLPRI);
uv__handle_stop(handle);
handle->poll_cb(handle, UV_EBADF, 0); <------ Here
return;
}