code: function isFinished (msg) {
    var socket = msg.socket
  
    if (typeof msg.finished === 'boolean') {
      // OutgoingMessage
      return Boolean(msg.finished || (socket && !socket.writable))
    }
  
    if (typeof msg.complete === 'boolean') {
      // IncomingMessage
      return Boolean(msg.upgrade || !socket || !socket.readable || (msg.complete && !msg.readable))
    }
  
    // don't know
    return undefined
  }
docs: Determine if message is already finished.
  
  @param {object} msg
  @return {boolean}
  @public