net_transport.go
func (n *netPipeline) decodeResponses() {
	timeout := n.trans.timeout
	for {
		select {
		case future := <-n.inprogressCh:
			if timeout > 0 {
				n.conn.conn.SetReadDeadline(time.Now().Add(timeout))
			}

			_, err := decodeResponse(n.conn, future.resp)
			future.respond(err)
			select {
			case n.doneCh <- future:
			case <-n.shutdownCh:
				return
			}
		case <-n.shutdownCh:
			return
		}
	}
}
func (n *netPipeline) decodeResponses() {
	timeout := n.trans.timeout
	for {
		select {
		case future := <-n.inprogressCh:
			if timeout > 0 {
				n.conn.conn.SetReadDeadline(time.Now().Add(timeout))
			}

			_, err := decodeResponse(n.conn, future.resp)
			future.respond(err)
			select {
			case n.doneCh <- future:
			case <-n.shutdownCh:
				return
			}
		case <-n.shutdownCh:
			return
		}
	}
}
func ( n * netPipeline ) decodeResponses ( ) { timeout := n . trans . timeout for { select { case future := <- n . inprogressCh : if timeout > 0 { n . conn . conn . SetReadDeadline ( time . Now ( ) . Add ( timeout ) ) } _ , err := decodeResponse ( n . conn , future . resp ) future . respond ( err ) select { case n . doneCh <- future : case <- n . shutdownCh : return } case <- n . shutdownCh : return } } }
// decodeResponses is a long running routine that decodes the responses
// sent on the connection.
decodeResponses is a long running routine that decodes the responses sent on the connection .