summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pkg/server/tunnel.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkg/server/tunnel.go b/pkg/server/tunnel.go
index 592f48c..1bb21b4 100644
--- a/pkg/server/tunnel.go
+++ b/pkg/server/tunnel.go
@@ -195,7 +195,13 @@ func (t *tunnel) delStream(s *stream) {
}
func (s *stream) info() string {
- d := time.Since(s.since).Milliseconds()
+ var d int64
+
+ if s.until.IsZero() {
+ d = time.Since(s.since).Milliseconds()
+ } else {
+ d = s.until.Sub(s.since).Milliseconds()
+ }
return fmt.Sprintf("%.3fs %d/%d -> %d/%d",
float64(d)/1000.0,