From 7073450735ec609b3ea21d4e9b295d3247a47363 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=8E=E6=89=87=E6=BB=91=E7=BF=94=E7=BF=BC?= Date: Tue, 7 Jan 2025 09:53:57 +0000 Subject: [PATCH] more log --- common/mux/client.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/mux/client.go b/common/mux/client.go index afc4ef96..f395dc43 100644 --- a/common/mux/client.go +++ b/common/mux/client.go @@ -174,6 +174,7 @@ type ClientWorker struct { link transport.Link done *done.Instance strategy ClientStrategy + timeCretaed time.Time } var ( @@ -188,6 +189,7 @@ func NewClientWorker(stream transport.Link, s ClientStrategy) (*ClientWorker, er link: stream, done: done.New(), strategy: s, + timeCretaed: time.Now(), } go c.fetchOutput() @@ -299,7 +301,7 @@ func (m *ClientWorker) Dispatch(ctx context.Context, link *transport.Link) bool return false } errors.LogInfo(ctx, "allocated mux.cool subConnection ID: ", s.ID, "/", m.strategy.MaxReuseTimes) - errors.LogInfo(ctx, "living subConnections:", sm.Size() , "/", m.strategy.MaxConcurrency) + errors.LogInfo(ctx, "living subConnections:", m.ActiveConnections(), "/", m.strategy.MaxConcurrency, ", this mux connection has been created for ", time.Since(m.timeCretaed).Truncate(time.Second)) s.input = link.Reader s.output = link.Writer go fetchInput(ctx, s, m.link.Writer)