recv-once and proper detection of closed channels.