Changeset 267 in code for trunk/upstream.go


Ignore:
Timestamp:
Apr 23, 2020, 2:36:20 PM (5 years ago)
Author:
contact
Message:

Add network.channels, remove DB.GetChannel

Store the list of configured channels in the network data structure.
This removes the need for a database lookup and will be useful for
detached channels.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/upstream.go

    r263 r267  
    422422                uc.logger.Printf("connection registered")
    423423
    424                 channels, err := uc.srv.db.ListChannels(uc.network.ID)
    425                 if err != nil {
    426                         uc.logger.Printf("failed to list channels from database: %v", err)
    427                         break
    428                 }
    429 
    430                 for _, ch := range channels {
     424                for _, ch := range uc.network.channels {
    431425                        params := []string{ch.Name}
    432426                        if ch.Key != "" {
Note: See TracChangeset for help on using the changeset viewer.