Fix static analysis issue in keepalive