Changeset 167 in code for trunk/downstream.go
- Timestamp:
- Mar 27, 2020, 4:55:03 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/downstream.go
r166 r167 309 309 if dc.isClosed() { 310 310 return fmt.Errorf("downstream connection already closed") 311 }312 313 if u := dc.user; u != nil {314 u.removeDownstream(dc)315 311 } 316 312 … … 758 754 seq := consumer.Close() 759 755 760 // TODO: need to take dc.network into account here 761 dc.user.lock.Lock() 762 lastDownstream := len(dc.user.downstreamConns) == 0 763 dc.user.lock.Unlock() 764 765 if lastDownstream { 766 net.lock.Lock() 767 net.history[historyName] = seq 768 net.lock.Unlock() 769 } 756 net.lock.Lock() 757 net.history[historyName] = seq 758 net.lock.Unlock() 770 759 }() 771 760 }
Note:
See TracChangeset
for help on using the changeset viewer.