code: func (s *sendStream) cancelWriteImpl(errorCode protocol.ApplicationErrorCode, writeErr error) bool /*completed */ {
  	if s.canceledWrite || s.finishedWriting {
  		return false
  	}
  	s.canceledWrite = true
  	s.cancelWriteErr = writeErr
  	s.signalWrite()
  	s.sender.queueControlFrame(&wire.ResetStreamFrame{
  		StreamID:   s.streamID,
  		ByteOffset: s.writeOffset,
  		ErrorCode:  errorCode,
  	})
  	// TODO(#991): cancel retransmissions for this stream
  	s.ctxCancel()
  	return true
  }
docs: // must be called after locking the mutex