Simplify ring consumer loop
No need to use Peek here.
This commit is contained in:
parent
7961fbc137
commit
e1ea0d4fb5
@ -693,13 +693,12 @@ func (dc *downstreamConn) welcome() error {
|
||||
}
|
||||
|
||||
for {
|
||||
msg := consumer.Peek()
|
||||
msg := consumer.Consume()
|
||||
if msg == nil {
|
||||
break
|
||||
}
|
||||
|
||||
dc.sendFromUpstream(msg, uc)
|
||||
consumer.Consume()
|
||||
}
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user