Fix sending CAP END twice when SASL is not used
When SASL is not used, we should only send CAP END after we send a CAP REQ. Previously CAP END was sent both after a CAP REQ and a CAP ACK, resulting in two CAP END messages. Sending a CAP END right after the CAP REQ rather than waiting for the CAP ACK/NAK saves 1 RTT.
This commit is contained in:
parent
de7b4c8588
commit
566986fdd5
@ -398,13 +398,6 @@ func (uc *upstreamConn) handleMessage(msg *irc.Message) error {
|
||||
}
|
||||
}
|
||||
|
||||
if uc.saslClient == nil {
|
||||
uc.SendMessage(&irc.Message{
|
||||
Command: "CAP",
|
||||
Params: []string{"END"},
|
||||
})
|
||||
}
|
||||
|
||||
if uc.registered {
|
||||
uc.forEachDownstream(func(dc *downstreamConn) {
|
||||
dc.updateSupportedCaps()
|
||||
|
Loading…
Reference in New Issue
Block a user