From 277573bb51c4a1dbf5d2be71f4d32d6b68edac39 Mon Sep 17 00:00:00 2001 From: hexian000 Date: Fri, 23 Jun 2023 19:53:53 +0800 Subject: [PATCH] fix derp Signed-off-by: hexian000 --- forwarder/forwarder.go | 2 +- metric.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/forwarder/forwarder.go b/forwarder/forwarder.go index b0eaf30..9299948 100644 --- a/forwarder/forwarder.go +++ b/forwarder/forwarder.go @@ -31,7 +31,7 @@ type forwarder struct { func New(maxConn int, g routines.Group) Forwarder { return &forwarder{ conn: make(map[net.Conn]struct{}), - counter: make(chan struct{}, maxConn*2), + counter: make(chan struct{}, maxConn), closeCh: make(chan struct{}), g: g, } diff --git a/metric.go b/metric.go index c48c448..e3e764b 100644 --- a/metric.go +++ b/metric.go @@ -81,7 +81,7 @@ func RunHTTPServer(l net.Listener, s *Server) error { } printf("\n") printf("%-20s: %v\n", "Tunnels", len(s.getConfig().Tunnels)) - printf("%-20s: %v / %v\n", "Sessions / Forwards", s.NumSessions(), s.f.Count()) + printf("%-20s: %v / %v\n", "Sessions / Streams", s.NumSessions(), s.f.Count()) printf("%-20s: %v\n", "Managed Routines", s.g.Count()) rx, tx := s.CountBytes() printf("%-20s: %s / %s\n", "Traffic (Rx/Tx)", formats.IECBytes(float64(rx)), formats.IECBytes(float64(tx)))