summaryrefslogtreecommitdiff
path: root/source3/lib/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r--source3/lib/util.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index e13a4c37e8..31ad3da31c 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -2888,6 +2888,13 @@ connect_again:
return -1;
}
+#ifdef EISCONN
+ if (ret < 0 && errno == EISCONN) {
+ errno = 0;
+ ret = 0;
+ }
+#endif
+
if (ret < 0) {
DEBUG(2,("error connecting to %s:%d (%s)\n",
inet_ntoa(*addr),port,strerror(errno)));