detect end of channel

pull/131/head v1.12
v2ray 2016-05-01 17:19:41 +02:00
parent 3df7634570
commit a538de56de
1 changed files with 4 additions and 1 deletions

View File

@ -55,7 +55,10 @@ func (this *fileLogWriter) Log(log LogEntry) {
func (this *fileLogWriter) run() {
for {
entry := <-this.queue
entry, open := <-this.queue
if !open {
break
}
this.logger.Print(entry.String() + platform.LineSeparator())
entry.Release()
entry = nil