Close friendly

Reduce the panic of runtime error: send on closed channel