Skip to content
Snippets Groups Projects
Commit 90a71d2c authored by Federico Montesino Pouzols's avatar Federico Montesino Pouzols
Browse files

check retval from setsockopt, 1076053, re #13951

parent 90b78bd3
No related branches found
No related tags found
No related merge requests found
......@@ -145,8 +145,14 @@ SOCKET isisds_send_open(const char *host, ISISDSAccessMode access_type,
if (s == INVALID_SOCKET) {
return INVALID_SOCKET;
}
setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, (char *)&setkeepalive,
sizeof(setkeepalive));
int zero = setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, (char *)&setkeepalive,
sizeof(setkeepalive));
if (0 != zero) {
closesocket(s);
return INVALID_SOCKET;
}
if (connect(s, (struct sockaddr *)&address, sizeof(address)) == -1) {
closesocket(s);
return INVALID_SOCKET;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment