summaryrefslogtreecommitdiff
path: root/plugins/mms
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2012-10-03 17:27:04 +0200
committerGravatar waker <wakeroid@gmail.com>2012-10-03 17:27:04 +0200
commit90ed6d2d107c3cd97e8670fda61dee05bfb9962d (patch)
tree589c46ca39fafb7395eadd06c9fa93bc3ab77185 /plugins/mms
parent4187edea48cb3163c7341849166be9a5c9f50faa (diff)
mms: fixed connection timeout handling -- now we wait about 6 seconds (200 attemps 30 ms each) before giving up
Diffstat (limited to 'plugins/mms')
-rw-r--r--plugins/mms/libmms/mms.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mms/libmms/mms.c b/plugins/mms/libmms/mms.c
index 8ffccc79..766a5761 100644
--- a/plugins/mms/libmms/mms.c
+++ b/plugins/mms/libmms/mms.c
@@ -159,7 +159,7 @@ static off_t fallback_io_read(void *data, int socket, char *buf, off_t num)
off_t len = 0, ret;
/* lprintf("%d\n", fallback_io_select(data, socket, MMS_IO_READ_READY, 1000)); */
errno = 0;
- int nretry = 5;
+ int nretry = 200;
while (len < num && nretry > 0)
{
ret = (off_t)read(socket, buf + len, num - len);
@@ -171,6 +171,7 @@ static off_t fallback_io_read(void *data, int socket, char *buf, off_t num)
switch(errno)
{
case EAGAIN:
+ usleep (30000); // sleeping 30ms 200 times will give us about 6 sec of time to complete the request
nretry--;
continue;
default: