mirror of
https://github.com/NLnetLabs/unbound.git
synced 2024-09-21 14:47:09 +00:00
- Fix windows tcp and tls spin on events.
git-svn-id: file:///svn/unbound/trunk@4696 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
d32fb26adb
commit
6792d2d036
@ -1,3 +1,6 @@
|
||||
28 May 2018: Wouter
|
||||
- Fix windows tcp and tls spin on events.
|
||||
|
||||
25 May 2018: Wouter
|
||||
- For TCP and TLS connections that don't establish, perform address
|
||||
update in infra cache, so future selections can exclude them.
|
||||
|
@ -842,20 +842,21 @@ int comm_point_perform_accept(struct comm_point* c,
|
||||
static long win_bio_cb(BIO *b, int oper, const char* ATTR_UNUSED(argp),
|
||||
int ATTR_UNUSED(argi), long argl, long retvalue)
|
||||
{
|
||||
int wsa_err = WSAGetLastError(); /* store errcode before it is gone */
|
||||
verbose(VERB_ALGO, "bio_cb %d, %s %s %s", oper,
|
||||
(oper&BIO_CB_RETURN)?"return":"before",
|
||||
(oper&BIO_CB_READ)?"read":((oper&BIO_CB_WRITE)?"write":"other"),
|
||||
WSAGetLastError()==WSAEWOULDBLOCK?"wsawb":"");
|
||||
wsa_err==WSAEWOULDBLOCK?"wsawb":"");
|
||||
/* on windows, check if previous operation caused EWOULDBLOCK */
|
||||
if( (oper == (BIO_CB_READ|BIO_CB_RETURN) && argl == 0) ||
|
||||
(oper == (BIO_CB_GETS|BIO_CB_RETURN) && argl == 0)) {
|
||||
if(WSAGetLastError() == WSAEWOULDBLOCK)
|
||||
if(wsa_err == WSAEWOULDBLOCK)
|
||||
ub_winsock_tcp_wouldblock((struct ub_event*)
|
||||
BIO_get_callback_arg(b), UB_EV_READ);
|
||||
}
|
||||
if( (oper == (BIO_CB_WRITE|BIO_CB_RETURN) && argl == 0) ||
|
||||
(oper == (BIO_CB_PUTS|BIO_CB_RETURN) && argl == 0)) {
|
||||
if(WSAGetLastError() == WSAEWOULDBLOCK)
|
||||
if(wsa_err == WSAEWOULDBLOCK)
|
||||
ub_winsock_tcp_wouldblock((struct ub_event*)
|
||||
BIO_get_callback_arg(b), UB_EV_WRITE);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user