Changeset 51 in code for trunk/downstream.go


Ignore:
Timestamp:
Feb 7, 2020, 4:35:57 PM (5 years ago)
Author:
contact
Message:

Add names to consumers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/downstream.go

    r50 r51  
    129129                }
    130130                u.lock.Unlock()
     131
     132                // TODO: figure out a better way to advance the ring buffer consumer cursor
     133                u.forEachUpstream(func(uc *upstreamConn) {
     134                        // TODO: let clients specify the ring buffer name in their username
     135                        uc.ring.Consumer("").Reset()
     136                })
    131137        }
    132138
     
    233239                }
    234240
    235                 consumer := uc.ring.Consumer()
     241                // TODO: let clients specify the ring buffer name in their username
     242                consumer := uc.ring.Consumer("")
    236243                for {
     244                        // TODO: these messages will get lost if the connection is closed
    237245                        msg := consumer.Consume()
    238246                        if msg == nil {
Note: See TracChangeset for help on using the changeset viewer.