summaryrefslogtreecommitdiffstats
path: root/sock_stuff.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2009-04-13 14:22:24 +0200
committerGravatar Nikias Bassen2009-04-13 14:22:24 +0200
commit9932dadfc7ddc65ccb3d2988df1a6dcc9cf536c5 (patch)
tree5e36527dc25154182889bd42bada7590f54a9c9d /sock_stuff.c
parentd6e0cb81973e99aa61c4b36e3e4a4dcd475c1e59 (diff)
downloadusbmuxd-9932dadfc7ddc65ccb3d2988df1a6dcc9cf536c5.tar.gz
usbmuxd-9932dadfc7ddc65ccb3d2988df1a6dcc9cf536c5.tar.bz2
This _should_ fix a race condition that happens when a client is about
to cleanup the stuff that is used by another client that is about to set up a new connection. Increased timeout in sock_stuff from 10 to 20 seconds and decreased the pullbulk recv timeout from 5 to 3 seconds.
Diffstat (limited to 'sock_stuff.c')
-rw-r--r--sock_stuff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sock_stuff.c b/sock_stuff.c
index 78249e6..8a06135 100644
--- a/sock_stuff.c
+++ b/sock_stuff.c
@@ -11,7 +11,7 @@
11#include <arpa/inet.h> 11#include <arpa/inet.h>
12#include "sock_stuff.h" 12#include "sock_stuff.h"
13 13
14#define RECV_TIMEOUT 10000 14#define RECV_TIMEOUT 20000
15 15
16static int verbose = 0; 16static int verbose = 0;
17 17
@@ -75,7 +75,7 @@ int connect_unix_socket(const char *filename)
75 75
76 // check if socket file exists... 76 // check if socket file exists...
77 if (stat(filename, &fst) != 0) { 77 if (stat(filename, &fst) != 0) {
78 if (verbose >= 2) fprintf(stderr, "%s: stat '%s': %s\n", __func__, filename, strerror(errno)); 78 if (verbose >= 2) fprintf(stderr, "%s: stat '%s': %s\n", __func__, filename, strerror(errno));
79 return -1; 79 return -1;
80 } 80 }
81 81