Browse Source

reduce time of waiting for channel empty

v2ray 9 years ago
parent
commit
1bd893501c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      transport/ray/direct.go

+ 1 - 1
transport/ray/direct.go

@@ -97,7 +97,7 @@ func (this *Stream) TryWriteOnce(data *alloc.Buffer) error {
 	select {
 	select {
 	case this.buffer <- data:
 	case this.buffer <- data:
 		return nil
 		return nil
-	case <-time.After(16 * time.Second):
+	case <-time.After(2 * time.Second):
 		return ErrorIOTimeout
 		return ErrorIOTimeout
 	}
 	}
 }
 }