diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-04-30 13:58:23 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:51:23 -0500 |
commit | fc7a1ee35e3bc7aff7a78e0e8e066699fa70fa4b (patch) | |
tree | c1c3c2a612e49d82861b2b6c738f3937f25acdab /source3 | |
parent | 0e551158b7d36d75819c36ef6570c115f6efcdcf (diff) | |
download | samba-fc7a1ee35e3bc7aff7a78e0e8e066699fa70fa4b.tar.gz samba-fc7a1ee35e3bc7aff7a78e0e8e066699fa70fa4b.tar.bz2 samba-fc7a1ee35e3bc7aff7a78e0e8e066699fa70fa4b.zip |
r426: fixed bug noticed by wim.delvaux@adaptiveplanet.com in handling of timeout in socket connections
(This used to be commit 88278b24de4e3e408ac8a6139bd375a72bc664ce)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/util_sock.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c index 845aaa4b13..3984f5e8ac 100644 --- a/source3/lib/util_sock.c +++ b/source3/lib/util_sock.c @@ -741,6 +741,7 @@ int open_socket_out(int type, struct in_addr *addr, int port ,int timeout) if (ret < 0 && (errno == EINPROGRESS || errno == EALREADY || errno == EAGAIN) && (connect_loop < timeout) ) { smb_msleep(connect_loop); + timeout -= connect_loop; connect_loop += increment; if (increment < 250) { /* After 8 rounds we end up at a max of 255 msec */ |