mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-08 03:44:22 -04:00
Add a temporary workaround for an ssl bug found on FreeBSD.
Basically, we only want to report the 'connected' event because of the socket connect() finishing when we have an actual socket bufferevent; on an SSL bufferevent, 'connected' means 'SSL connection finished.' This isn't FreeBSD's fault: it just has a connect() that tends to succeed pretty early. svn:r1548
This commit is contained in:
parent
9bf124bff6
commit
cf749e227c
@ -374,7 +374,12 @@ bufferevent_socket_connect(struct bufferevent *bev,
|
||||
} else {
|
||||
/* The connect succeeded already. How odd. */
|
||||
result = 0;
|
||||
_bufferevent_run_eventcb(bev, BEV_EVENT_CONNECTED);
|
||||
/* XXXX The strcmp here is a stupid hack to prevent delivering
|
||||
* a CONNECTED to an SSL bufferevent before its SSL is done
|
||||
* negotiating. Really we should find some way to do this that
|
||||
* isn't an explicit type-check. */
|
||||
if (strcmp(bev->be_ops->type, "ssl"))
|
||||
_bufferevent_run_eventcb(bev, BEV_EVENT_CONNECTED);
|
||||
}
|
||||
|
||||
goto done;
|
||||
|
Loading…
x
Reference in New Issue
Block a user