Simplify ring consumer loop

No need to use Peek here.
This commit is contained in:
Simon Ser 2020-04-06 18:34:33 +02:00
parent 7961fbc137
commit e1ea0d4fb5
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48

View File

@ -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()
}
})