mirror of
https://github.com/hufrea/byedpi.git
synced 2024-11-28 11:18:53 +03:00
ignore events until connection is established
This commit is contained in:
parent
02a9e046fd
commit
dc6966ec1c
1 changed files with 6 additions and 1 deletions
7
proxy.c
7
proxy.c
|
@ -408,6 +408,10 @@ int create_conn(struct poolhd *pool,
|
||||||
close(sfd);
|
close(sfd);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
if (mod_etype(pool, val, 0) < 0) {
|
||||||
|
uniperror("mod_etype");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
val->pair = pair;
|
val->pair = pair;
|
||||||
pair->pair = val;
|
pair->pair = val;
|
||||||
#ifdef __NetBSD__
|
#ifdef __NetBSD__
|
||||||
|
@ -870,7 +874,8 @@ static inline int on_connect(struct poolhd *pool, struct eval *val, int e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (mod_etype(pool, val, POLLIN)) {
|
if (mod_etype(pool, val, POLLIN) ||
|
||||||
|
mod_etype(pool, val->pair, POLLIN)) {
|
||||||
uniperror("mod_etype");
|
uniperror("mod_etype");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue