use runtime checking instead of compile-time checking for TCP_FASTOPEN

This commit is contained in:
clowwindy
2014-05-03 15:39:05 +08:00
parent 75add87313
commit 5d0696f655
2 changed files with 18 additions and 1 deletions
+6
View File
@@ -211,6 +211,12 @@ static void server_recv_cb (EV_P_ ev_io *w, int revents)
else
{
ERROR("sendto");
if (errno == ENOTCONN)
{
LOGE("fast open is not supported on this platform");
// just turn it off
fast_open = 0;
}
close_and_free_remote(EV_A_ remote);
close_and_free_server(EV_A_ server);
return;