Changeset 467 in code for trunk


Ignore:
Timestamp:
Mar 16, 2021, 8:41:07 AM (4 years ago)
Author:
contact
Message:

Send NOTICE to downstream when upstream is disconnected

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/user.go

    r453 r467  
    429429                        u.downstreamConns = append(u.downstreamConns, dc)
    430430
     431                        dc.forEachNetwork(func(network *network) {
     432                                if network.lastError != nil {
     433                                        sendServiceNOTICE(dc, fmt.Sprintf("disconnected from %s: %v", network.GetName(), network.lastError))
     434                                }
     435                        })
     436
    431437                        u.forEachUpstream(func(uc *upstreamConn) {
    432438                                uc.updateAway()
Note: See TracChangeset for help on using the changeset viewer.