1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 01:57:12 -05:00

safer for loop

This commit is contained in:
v2ray 2016-05-01 17:19:09 +02:00
parent b453288e04
commit 3df7634570

View File

@ -54,9 +54,11 @@ func (this *fileLogWriter) Log(log LogEntry) {
}
func (this *fileLogWriter) run() {
for entry := range this.queue {
for {
entry := <-this.queue
this.logger.Print(entry.String() + platform.LineSeparator())
entry.Release()
entry = nil
}
}