upstream: handle ERR_UNKNOWNERROR and ERR_NEEDMOREPARAMS for queued commands

We need to dequeue the commands when we receive these messages.
This commit is contained in:
Simon Ser 2022-07-04 17:13:31 +02:00
parent 689dc8a632
commit 739adf7eb9

View File

@ -1691,7 +1691,7 @@ func (uc *upstreamConn) handleMessage(ctx context.Context, msg *irc.Message) err
}) })
} }
} }
case irc.ERR_UNKNOWNCOMMAND, irc.RPL_TRYAGAIN: case xirc.ERR_UNKNOWNERROR, irc.ERR_UNKNOWNCOMMAND, irc.ERR_NEEDMOREPARAMS, irc.RPL_TRYAGAIN:
var command, reason string var command, reason string
if err := parseMessageParams(msg, nil, &command, &reason); err != nil { if err := parseMessageParams(msg, nil, &command, &reason); err != nil {
return err return err