Changeset 406 in code for trunk/upstream.go
- Timestamp:
- Aug 20, 2020, 3:38:57 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/upstream.go
r405 r406 1636 1636 } 1637 1637 1638 // If no client is offline, no need to append the message to the buffer1639 if len(uc.network.offlineClients) == 0 && !detached {1640 return1641 }1642 1643 1638 history, ok := uc.network.history[entity] 1644 1639 if !ok { 1645 1640 history = &networkHistory{ 1646 offlineClients: make(map[string]uint64),1647 ring: 1641 clients: make(map[string]uint64), 1642 ring: NewRing(uc.srv.RingCap), 1648 1643 } 1649 1644 uc.network.history[entity] = history 1650 1645 1651 1646 for clientName, _ := range uc.network.offlineClients { 1652 history. offlineClients[clientName] = 01647 history.clients[clientName] = 0 1653 1648 } 1654 1649 … … 1657 1652 // clients too 1658 1653 uc.forEachDownstream(func(dc *downstreamConn) { 1659 history. offlineClients[dc.clientName] = 01654 history.clients[dc.clientName] = 0 1660 1655 }) 1661 1656 } … … 1663 1658 1664 1659 history.ring.Produce(msg) 1660 1661 if !detached { 1662 uc.forEachDownstream(func(dc *downstreamConn) { 1663 history.clients[dc.clientName] = history.ring.Cur() 1664 }) 1665 } 1665 1666 } 1666 1667
Note:
See TracChangeset
for help on using the changeset viewer.