This commit is contained in:
Max Lv
2016-05-26 14:35:02 +08:00
parent 7f9e13d473
commit 0cfae045e8
7 changed files with 21 additions and 6 deletions
+2 -2
View File
@@ -457,7 +457,7 @@ static remote_t *connect_to_remote(struct addrinfo *res,
res->ai_addrlen);
#endif
if (s == -1) {
if (errno == EINPROGRESS || errno == EAGAIN
if (errno == CONNECT_IN_PROGRESS || errno == EAGAIN
|| errno == EWOULDBLOCK) {
// The remote server doesn't support tfo or it's the first connection to the server.
// It will automatically fall back to conventional TCP.
@@ -482,7 +482,7 @@ static remote_t *connect_to_remote(struct addrinfo *res,
if (!fast_open) {
int r = connect(sockfd, res->ai_addr, res->ai_addrlen);
if (r < 0 && errno != EINPROGRESS) {
if (r < 0 && errno != CONNECT_IN_PROGRESS) {
ERROR("connect");
close(sockfd);
return NULL;