fix OOM: close if not keepalive