Sfoglia il codice sorgente

reduce time of waiting for channel empty

v2ray 9 anni fa
parent
commit
1bd893501c
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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 {
 	case this.buffer <- data:
 		return nil
-	case <-time.After(16 * time.Second):
+	case <-time.After(2 * time.Second):
 		return ErrorIOTimeout
 	}
 }