Clean up keepalive handling