From dd5b0abc67b024e767aec09d4769a08cf07b72f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Thu, 23 Mar 2023 17:14:38 +0800 Subject: [PATCH] Fix slow open --- common/dialer/tfo.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/dialer/tfo.go b/common/dialer/tfo.go index 70f97386..0205daaf 100644 --- a/common/dialer/tfo.go +++ b/common/dialer/tfo.go @@ -119,6 +119,10 @@ func (c *slowOpenConn) LazyHeadroom() bool { return c.conn == nil } +func (c *slowOpenConn) NeedHandshake() bool { + return c.conn == nil +} + func (c *slowOpenConn) ReadFrom(r io.Reader) (n int64, err error) { if c.conn != nil { return bufio.Copy(c.conn, r)