Переглянути джерело

Fix VMess inbound for empty response

v2ray 9 роки тому
батько
коміт
96ec5cfc58
1 змінених файлів з 2 додано та 1 видалено
  1. 2 1
      proxy/vmess/inbound/inbound.go

+ 2 - 1
proxy/vmess/inbound/inbound.go

@@ -227,10 +227,11 @@ func (this *VMessInboundHandler) HandleConnection(connection internet.Connection
 	}
 	output.Release()
 	if request.Option.Has(protocol.RequestOptionChunkStream) {
-		if err := v2writer.Write(alloc.NewSmallBuffer().Clear()); err != nil {
+		if err := v2writer.Write(alloc.NewLocalBuffer(32).Clear()); err != nil {
 			connection.SetReusable(false)
 		}
 	}
+	writer.Flush()
 	v2writer.Release()
 
 	readFinish.Lock()