static inline isc_result_t
unwatch_fd(isc__socketthread_t *thread, int fd, int msg) {
isc_result_t result = ISC_R_SUCCESS;
-
+ if (fd <= 0) {
+ return (ISC_R_SUCCESS);
+ }
#ifdef USE_KQUEUE
struct kevent evchange;
send_recvdone_event(sock, &dev);
break;
}
-
dev = ISC_LIST_HEAD(sock->recv_list);
}
send_senddone_event(sock, &dev);
break;
}
-
dev = ISC_LIST_HEAD(sock->send_list);
}
* paying attention to it.
*/
bool do_poke = ISC_LIST_EMPTY(sock->send_list);
+ if (do_poke) {
+ io_state = doio_send(sock, dev);
+ if (io_state == DOIO_HARD || io_state == DOIO_SUCCESS) {
+ if ((flags & ISC_SOCKFLAG_IMMEDIATE) == 0) {
+ send_senddone_event(sock, &dev);
+ }
+ break;
+ }
+ }
+
ISC_LIST_ENQUEUE(sock->send_list, dev, ev_link);
if (do_poke) {
select_poke(sock->manager, sock->threadid,