Run $kernel->terminate after connection is closed in HHVM