func (r *Replica) ReplyPropose(reply *genericsmrproto.ProposeReply, w *bufio.Writer) {
	//r.clientMutex.Lock()
	//defer r.clientMutex.Unlock()
	//w.WriteByte(genericsmrproto.PROPOSE_REPLY)
	reply.Marshal(w)
	w.Flush()
}
Exemple #2
0
func (r *Replica) ReplyPropose(reply *genericsmrproto.ProposeReply, propose *Propose) {
	if propose.Writer == nil || propose.Lock == nil {
		return
	}
	propose.Lock.Lock()
	defer propose.Lock.Unlock()
	//w.WriteByte(genericsmrproto.PROPOSE_REPLY)
	reply.Marshal(propose.Writer)
	propose.Writer.Flush()
}