diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-04-30 13:58:23 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2004-04-30 13:58:23 +0000 |
commit | a4de2269b08da321550250a9b94b5eb1a0493bf7 (patch) | |
tree | eb8172324974d4533d4507193609d57a28b0c3fe /source/lib | |
parent | 8afbc88a0caa85a1d824f1ca3c7ddfd0f465b30c (diff) | |
download | samba-a4de2269b08da321550250a9b94b5eb1a0493bf7.tar.gz samba-a4de2269b08da321550250a9b94b5eb1a0493bf7.tar.xz samba-a4de2269b08da321550250a9b94b5eb1a0493bf7.zip |
r426: fixed bug noticed by wim.delvaux@adaptiveplanet.com in handling of timeout in socket connections
Diffstat (limited to 'source/lib')
-rw-r--r-- | source/lib/util_sock.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c index 845aaa4b13a..3984f5e8ac2 100644 --- a/source/lib/util_sock.c +++ b/source/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 */ |