[PATCH 1/2] remote: fix daemon deadlock when a stream event closes its client