Changeset 295 in code for trunk/upstream.go


Ignore:
Timestamp:
May 21, 2020, 8:38:07 PM (5 years ago)
Author:
delthas
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/upstream.go

    r294 r295  
    397397                                        return err
    398398                                }
    399                         }
    400 
    401                         if uc.saslClient == nil {
    402                                 uc.SendMessage(&irc.Message{
    403                                         Command: "CAP",
    404                                         Params:  []string{"END"},
    405                                 })
    406399                        }
    407400
Note: See TracChangeset for help on using the changeset viewer.