diff --git a/src/local.c b/src/local.c index 11a7d07c..b3feb4ca 100644 --- a/src/local.c +++ b/src/local.c @@ -404,10 +404,13 @@ server_recv_cb(EV_P_ ev_io *w, int revents) ev_io_start(EV_A_ & remote->send_ctx->io); return; } else { - if (errno == ENOTCONN) { + if (errno == EOPNOTSUPP || errno == EPROTONOSUPPORT || + errno == ENOPROTOOPT) { LOGE("fast open is not supported on this platform"); // just turn it off fast_open = 0; + } else { + ERROR("fast_open_connect"); } close_and_free_remote(EV_A_ remote); close_and_free_server(EV_A_ server); diff --git a/src/redir.c b/src/redir.c index 08416845..f94f07ac 100644 --- a/src/redir.c +++ b/src/redir.c @@ -578,8 +578,13 @@ remote_send_cb(EV_P_ ev_io *w, int revents) ev_io_start(EV_A_ & remote_send_ctx->io); ev_timer_start(EV_A_ & remote_send_ctx->watcher); } else { - fast_open = 0; - LOGE("fast open is not supported on this platform"); + if (errno == EOPNOTSUPP || errno == EPROTONOSUPPORT || + errno == ENOPROTOOPT) { + fast_open = 0; + LOGE("fast open is not supported on this platform"); + } else { + ERROR("fast_open_connect"); + } close_and_free_remote(EV_A_ remote); close_and_free_server(EV_A_ server); } diff --git a/src/server.c b/src/server.c index 2719e7b8..6af84a7e 100644 --- a/src/server.c +++ b/src/server.c @@ -543,7 +543,7 @@ connect_to_remote(EV_P_ struct addrinfo *res, fast_open = 0; LOGE("fast open is not supported on this platform"); } else { - ERROR("sendto"); + ERROR("fast_open_connect"); } } else { server->buf->idx += s;