From: Aki Tuomi Date: Tue, 9 Jul 2013 07:29:59 +0000 (+0300) Subject: Merge branch 'remotebackend-coverity-20130709' into remotebackend-unix-test X-Git-Tag: rec-3.6.0-rc1~579^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d12a871f3abf6fbaf97293a2dd1eed22e1f9a45;p=thirdparty%2Fpdns.git Merge branch 'remotebackend-coverity-20130709' into remotebackend-unix-test --- 4d12a871f3abf6fbaf97293a2dd1eed22e1f9a45 diff --cc modules/remotebackend/unixconnector.cc index 4894dd3177,ff7080d07c..5ef5ec2981 --- a/modules/remotebackend/unixconnector.cc +++ b/modules/remotebackend/unixconnector.cc @@@ -135,9 -135,14 +136,14 @@@ void UnixsocketConnector::reconnect() sock.sun_family = AF_UNIX; memset(sock.sun_path, 0, UNIX_PATH_MAX); path.copy(sock.sun_path, UNIX_PATH_MAX, 0); - fcntl(fd, F_SETFL, O_NONBLOCK, &fd); + if (fcntl(fd, F_SETFL, O_NONBLOCK, &fd)) { + connected = false; + L<(&sock), sizeof sock)==-1 && (errno == EINPROGRESS)) { + while((rv = connect(fd, reinterpret_cast(&sock), sizeof sock))==-1 && (errno == EINPROGRESS)) { waitForData(fd, 0, 500); }