Changeset 223 in code for trunk


Ignore:
Timestamp:
Apr 5, 2020, 1:15:42 PM (5 years ago)
Author:
contact
Message:

Use Network.GetName in network status NOTICE messages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/user.go

    r222 r223  
    240240
    241241                        uc.forEachDownstream(func(dc *downstreamConn) {
    242                                 sendServiceNOTICE(dc, fmt.Sprintf("connected to %s", uc.network.Name))
     242                                sendServiceNOTICE(dc, fmt.Sprintf("connected to %s", uc.network.GetName()))
    243243                        })
    244244                        uc.network.lastError = nil
     
    260260                        if uc.network.lastError == nil {
    261261                                uc.forEachDownstream(func(dc *downstreamConn) {
    262                                         sendServiceNOTICE(dc, fmt.Sprintf("disconnected from %s", uc.network.Name))
     262                                        sendServiceNOTICE(dc, fmt.Sprintf("disconnected from %s", uc.network.GetName()))
    263263                                })
    264264                        }
     
    268268                        if net.lastError == nil || net.lastError.Error() != e.err.Error() {
    269269                                net.forEachDownstream(func(dc *downstreamConn) {
    270                                         sendServiceNOTICE(dc, fmt.Sprintf("failed connecting/registering to %s: %v", net.Name, e.err))
     270                                        sendServiceNOTICE(dc, fmt.Sprintf("failed connecting/registering to %s: %v", net.GetName(), e.err))
    271271                                })
    272272                        }
     
    276276
    277277                        uc.forEachDownstream(func(dc *downstreamConn) {
    278                                 sendServiceNOTICE(dc, fmt.Sprintf("disconnected from %s: %v", uc.network.Name, e.err))
     278                                sendServiceNOTICE(dc, fmt.Sprintf("disconnected from %s: %v", uc.network.GetName(), e.err))
    279279                        })
    280280                        uc.network.lastError = e.err
Note: See TracChangeset for help on using the changeset viewer.