Skip to content

Commit f60c5ee

Browse files
authored
more log
1 parent 824217c commit f60c5ee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

common/mux/client.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ type ClientWorker struct {
174174
link transport.Link
175175
done *done.Instance
176176
strategy ClientStrategy
177+
timeCretaed time.Time
177178
}
178179

179180
var (
@@ -188,6 +189,7 @@ func NewClientWorker(stream transport.Link, s ClientStrategy) (*ClientWorker, er
188189
link: stream,
189190
done: done.New(),
190191
strategy: s,
192+
timeCretaed: time.Now(),
191193
}
192194

193195
go c.fetchOutput()
@@ -299,7 +301,7 @@ func (m *ClientWorker) Dispatch(ctx context.Context, link *transport.Link) bool
299301
return false
300302
}
301303
errors.LogInfo(ctx, "allocated mux.cool subConnection ID: ", s.ID, "/", m.strategy.MaxReuseTimes)
302-
errors.LogInfo(ctx, "living subConnections:", sm.Size() , "/", m.strategy.MaxConcurrency)
304+
errors.LogInfo(ctx, "living subConnections:", m.ActiveConnections(), "/", m.strategy.MaxConcurrency, ", this mux connection has been created for ", time.Since(m.timeCretaed))
303305
s.input = link.Reader
304306
s.output = link.Writer
305307
go fetchInput(ctx, s, m.link.Writer)

0 commit comments

Comments
 (0)