Changeset 109 in code for trunk/downstream.go


Ignore:
Timestamp:
Mar 16, 2020, 2:08:56 PM (5 years ago)
Author:
contact
Message:

Protect upstreamConn.history with a lock

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/downstream.go

    r108 r109  
    556556                var seqPtr *uint64
    557557                if firstDownstream {
     558                        uc.lock.Lock()
    558559                        seq, ok := uc.history[historyName]
     560                        uc.lock.Unlock()
    559561                        if ok {
    560562                                seqPtr = &seq
     
    584586
    585587                        if lastDownstream {
     588                                uc.lock.Lock()
    586589                                uc.history[historyName] = seq
     590                                uc.lock.Unlock()
    587591                        }
    588592                }()
Note: See TracChangeset for help on using the changeset viewer.