Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/tds/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,8 @@ tds_select(TDSSOCKET * tds, unsigned tds_sel, int timeout_seconds)

switch (sock_errno) {
case TDSSOCK_EINTR:
case EAGAIN:
case TDSSOCK_EINPROGRESS:
/* FIXME this should be global maximun, not loop one */
seconds += poll_seconds;
break; /* let interrupt handler be called */
Expand All @@ -683,7 +685,10 @@ tds_select(TDSSOCKET * tds, unsigned tds_sel, int timeout_seconds)
}
}

assert(rc == 0 || (rc < 0 && sock_errno == TDSSOCK_EINTR));
assert(rc == 0 || (rc < 0 && (sock_errno == TDSSOCK_EINTR ||
sock_errno == EAGAIN ||
sock_errno == TDSSOCK_EINPROGRESS
)));

if (tds_get_ctx(tds) && tds_get_ctx(tds)->int_handler) { /* interrupt handler installed */
/*
Expand Down