Changeset 469 in code for trunk/upstream.go


Ignore:
Timestamp:
Mar 16, 2021, 5:25:21 PM (4 years ago)
Author:
contact
Message:

Don't update downstream caps in upstream RPL_WELCOME handler

Prior to being registered, upstreamConn.handleMessage doesn't run
in the user goroutine, it runs in a goroutine specific to the
network. Thus we shouldn't access any user data structure from
there.

downstreamConn.updateSupportedCaps is already called from the
eventUpstreamConnected handler in user.run, the call being removed
was unnecessary.

Closes: https://todo.sr.ht/~emersion/soju/108

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/upstream.go

    r468 r469  
    590590                uc.registered = true
    591591                uc.logger.Printf("connection registered")
    592 
    593                 uc.forEachDownstream(func(dc *downstreamConn) {
    594                         dc.updateSupportedCaps()
    595                 })
    596592
    597593                if len(uc.network.channels) > 0 {
Note: See TracChangeset for help on using the changeset viewer.