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:
parent
b453288e04
commit
3df7634570
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user