diff --git a/inbound/hysteria.go b/inbound/hysteria.go index ef023094..9e383c2f 100644 --- a/inbound/hysteria.go +++ b/inbound/hysteria.go @@ -332,7 +332,7 @@ func (h *Hysteria) Close() error { h.udpAccess.Unlock() return common.Close( &h.myInboundAdapter, - h.listener, + common.PtrOrNil(h.listener), h.tlsConfig, ) } diff --git a/transport/v2rayquic/server.go b/transport/v2rayquic/server.go index 4384ba00..2fd572df 100644 --- a/transport/v2rayquic/server.go +++ b/transport/v2rayquic/server.go @@ -94,5 +94,5 @@ func (s *Server) streamAcceptLoop(conn quic.Connection) error { } func (s *Server) Close() error { - return common.Close(s.udpListener, s.quicListener) + return common.Close(s.udpListener, common.PtrOrNil(s.quicListener)) }