Fix livestatus keepalive handling

fixes #5314