Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b5da515

Browse files
knizhnikkelvich
authored andcommitted
Add KEEPALIVE
1 parent 4574fbd commit b5da515

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arbiter.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ static int MtmConnectSocket(char const* host, int port, int max_attempts)
269269
int optval = 1;
270270
MtmArbiterMessage msg;
271271
setsockopt(sd, IPPROTO_TCP, TCP_NODELAY, (char const*)&optval, sizeof(optval));
272+
setsockopt(sd, SOL_SOCKET, SO_KEEPALIVE, (char const*)&optval, sizeof(optval));
272273

273274
msg.code = MSG_HANDSHAKE;
274275
msg.node = MtmNodeId;

0 commit comments

Comments
 (0)