gotd: assume any response is an ack

This commit is contained in:
Tulir Asokan
2026-03-28 16:44:17 +02:00
parent 472b9df44c
commit abae7b2854
2 changed files with 8 additions and 4 deletions
+2
View File
@@ -231,6 +231,7 @@ func (e *Engine) retryUntilAck(ctx context.Context, req Request) (sent bool, err
// NotifyResult notifies engine about received RPC response.
func (e *Engine) NotifyResult(msgID int64, b *bin.Buffer) error {
e.mux.Lock()
e.notifyAckUnlocked(msgID)
fn, ok := e.rpc[msgID]
e.mux.Unlock()
if !ok {
@@ -245,6 +246,7 @@ func (e *Engine) NotifyResult(msgID int64, b *bin.Buffer) error {
func (e *Engine) NotifyError(msgID int64, rpcErr error) {
e.onError(rpcErr)
e.mux.Lock()
e.notifyAckUnlocked(msgID)
fn, ok := e.rpc[msgID]
e.mux.Unlock()
if !ok {