fix race condition

This commit is contained in:
ginuerzh
2023-10-19 23:47:47 +08:00
parent f2fd6554ad
commit cc4310106b
29 changed files with 157 additions and 156 deletions

View File

@ -11,10 +11,6 @@ import (
"github.com/google/uuid"
)
const (
defaultMuxVersion = 2
)
var (
ErrInvalidTunnelID = errors.New("tunnel: invalid tunnel ID")
)
@ -51,9 +47,6 @@ func (c *tunnelConnector) parseMetadata(md mdata.Metadata) (err error) {
MaxReceiveBuffer: mdutil.GetInt(md, "mux.maxReceiveBuffer"),
MaxStreamBuffer: mdutil.GetInt(md, "mux.maxStreamBuffer"),
}
if c.md.muxCfg.Version == 0 {
c.md.muxCfg.Version = defaultMuxVersion
}
return
}