---
src/rpc/virnetsocket.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c
index ef93892..6684eef 100644
--- a/src/rpc/virnetsocket.c
+++ b/src/rpc/virnetsocket.c
@@ -470,7 +470,9 @@ int virNetSocketNewConnectTCP(const char *nodename,
goto error;
}
- setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt));
+ if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) < 0) {
+ VIR_WARN("Unable to enable port reuse");
+ }
if (connect(fd, runp->ai_addr, runp->ai_addrlen) >= 0)
break;
--
1.7.11.7