Add setters for TCP keepalive values
This patch adds 3 functions to set the 3 keepalive values TCP_KEEPIDLE, TCP_KEEPCNT and TCP_KEEPINTVL. The values have to be set after iscsi context creation and are then configured on the socket on each new connection.
This commit is contained in:
@@ -71,6 +71,10 @@ iscsi_create_context(const char *initiator_name)
|
||||
iscsi->use_immediate_data = ISCSI_IMMEDIATE_DATA_YES;
|
||||
iscsi->want_header_digest = ISCSI_HEADER_DIGEST_NONE_CRC32C;
|
||||
|
||||
iscsi->tcp_keepcnt=3;
|
||||
iscsi->tcp_keepintvl=30;
|
||||
iscsi->tcp_keepidle=30;
|
||||
|
||||
return iscsi;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user