-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
closed #74
- Loading branch information
Showing
3 changed files
with
32 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
diff --git a/src/jconf.h b/src/jconf.h | ||
index 7504cbb..8cf7cce 100644 | ||
--- a/src/jconf.h | ||
+++ b/src/jconf.h | ||
@@ -26,7 +26,7 @@ | ||
#define MAX_CONF_SIZE 16 * 1024 | ||
#define MAX_DNS_NUM 4 | ||
#define MAX_CONNECT_TIMEOUT 10 | ||
-#define MAX_UDP_TIMEOUT 120 | ||
+#define MAX_UDP_TIMEOUT 10 | ||
|
||
typedef struct { | ||
char *host; | ||
diff --git a/src/netutils.c b/src/netutils.c | ||
index ce427b4..17d13c9 100644 | ||
--- a/src/netutils.c | ||
+++ b/src/netutils.c | ||
@@ -80,9 +80,9 @@ size_t get_sockaddr(char *host, char *port, struct sockaddr_storage *storage, in | ||
hints.ai_family = AF_UNSPEC; /* Return IPv4 and IPv6 choices */ | ||
hints.ai_socktype = SOCK_STREAM; /* We want a TCP socket */ | ||
|
||
- int err; | ||
+ int err, i; | ||
|
||
- for (int i = 1; i < 8; i++) { | ||
+ for (i = 1; i < 8; i++) { | ||
err = getaddrinfo(host, port, &hints, &result); | ||
if (!block || !err) { | ||
break; |