From 76fbcb2046557975c27a7ece8c1de13d3fde2cb5 Mon Sep 17 00:00:00 2001 From: ginuerzh Date: Wed, 2 Nov 2022 20:44:55 +0800 Subject: [PATCH] add multiplex indication for pht --- dialer/pht/dialer.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dialer/pht/dialer.go b/dialer/pht/dialer.go index 856e5f7..2bb2444 100644 --- a/dialer/pht/dialer.go +++ b/dialer/pht/dialer.go @@ -61,6 +61,12 @@ func (d *phtDialer) Init(md md.Metadata) (err error) { return nil } +// Multiplex implements dialer.Multiplexer interface. +// NOTE: PHT is not a real multiplexed tunnel. +func (d *phtDialer) Multiplex() bool { + return true +} + func (d *phtDialer) Dial(ctx context.Context, addr string, opts ...dialer.DialOption) (net.Conn, error) { d.clientMutex.Lock() defer d.clientMutex.Unlock()