set socket keepalive when client is using keepalive agent