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 @@
#include <arpa/inet.h>
#include "sock_stuff.h"
-#define RECV_TIMEOUT 10000
+#define RECV_TIMEOUT 20000
static int verbose = 0;
@@ -75,7 +75,7 @@ int connect_unix_socket(const char *filename)
// check if socket file exists...
if (stat(filename, &fst) != 0) {
- if (verbose >= 2) fprintf(stderr, "%s: stat '%s': %s\n", __func__, filename, strerror(errno));
+ if (verbose >= 2) fprintf(stderr, "%s: stat '%s': %s\n", __func__, filename, strerror(errno));
return -1;
}