return nil if peer notifies us of connection close