fix: tunnel panic

This commit is contained in:
wwqgtxx 2022-12-11 08:59:57 +08:00
parent 910e7fed97
commit b5928c36a3

View file

@ -64,7 +64,13 @@ func (t *Tunnel) Close() error {
// Address implements constant.InboundListener // Address implements constant.InboundListener
func (t *Tunnel) Address() string { func (t *Tunnel) Address() string {
return t.ttl.Address() if t.ttl != nil {
return t.ttl.Address()
}
if t.tul != nil {
return t.tul.Address()
}
return ""
} }
// Listen implements constant.InboundListener // Listen implements constant.InboundListener