diff --git a/v2/go.mod b/v2/go.mod index 6444c7b..13db11a 100644 --- a/v2/go.mod +++ b/v2/go.mod @@ -4,5 +4,5 @@ go 1.20 require ( github.com/hashicorp/yamux v0.1.1 - github.com/hexian000/gosnippets v0.0.0-20231117080430-a4acb9b3a8fb + github.com/hexian000/gosnippets v0.0.0-20231118040836-0cf2fe6a912d ) diff --git a/v2/go.sum b/v2/go.sum index 9599862..3314a63 100644 --- a/v2/go.sum +++ b/v2/go.sum @@ -1,4 +1,4 @@ github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= -github.com/hexian000/gosnippets v0.0.0-20231117080430-a4acb9b3a8fb h1:4G+ckJgjasXC4eeQuPQB+Wh818zrGNDq42GuHSEYCl0= -github.com/hexian000/gosnippets v0.0.0-20231117080430-a4acb9b3a8fb/go.mod h1:SItpHKzoWxn8Lj2kJiw1ridZGDunCyUIbpL1N/7j6FQ= +github.com/hexian000/gosnippets v0.0.0-20231118040836-0cf2fe6a912d h1:lPBFKcN1Yv40eXi4dKQiN1vsAJzFP8Gx+23j2qf61yc= +github.com/hexian000/gosnippets v0.0.0-20231118040836-0cf2fe6a912d/go.mod h1:SItpHKzoWxn8Lj2kJiw1ridZGDunCyUIbpL1N/7j6FQ= diff --git a/v2/tunnel.go b/v2/tunnel.go index cffeee8..cefca52 100644 --- a/v2/tunnel.go +++ b/v2/tunnel.go @@ -50,7 +50,7 @@ func (t *Tunnel) Start() error { t.l = hlistener.Wrap(l, &hlistener.Config{ Start: uint32(c.StartupLimitStart), Full: uint32(c.StartupLimitFull), - Rate: c.StartupLimitRate, + Rate: float64(c.StartupLimitRate) / 100.0, MaxSessions: uint32(c.MaxSessions), Stats: h.Stats, })