Skip to content

Commit 6d81e4c

Browse files
authored
Merge pull request #325 from fatedier/dev
merge dev to master
2 parents 1126038 + faf584e commit 6d81e4c

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# frp
22

3-
[![Build Status](https://travis-ci.org/fatedier/frp.svg)](https://travis-ci.org/fatedier/frp)
3+
[![Build Status](https://travis-ci.org/fatedier/frp.svg?branch=master)](https://travis-ci.org/fatedier/frp)
44

55
[README](README.md) | [中文文档](README_zh.md)
66

README_zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# frp
22

3-
[![Build Status](https://travis-ci.org/fatedier/frp.svg)](https://travis-ci.org/fatedier/frp)
3+
[![Build Status](https://travis-ci.org/fatedier/frp.svg?branch=master)](https://travis-ci.org/fatedier/frp)
44

55
[README](README.md) | [中文文档](README_zh.md)
66

server/metric.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,14 @@ type ServerStatistics struct {
3232
TotalTrafficOut metric.DateCounter
3333
CurConns metric.Counter
3434

35-
ClientCounts metric.Counter
35+
// counter for clients
36+
ClientCounts metric.Counter
37+
38+
// counter for proxy types
3639
ProxyTypeCounts map[string]metric.Counter
3740

41+
// statistics for different proxies
42+
// key is proxy name
3843
ProxyStatistics map[string]*ProxyStatistics
3944

4045
mu sync.Mutex
@@ -84,7 +89,7 @@ func StatsNewProxy(name string, proxyType string) {
8489
globalStats.ProxyTypeCounts[proxyType] = counter
8590

8691
proxyStats, ok := globalStats.ProxyStatistics[name]
87-
if !ok {
92+
if !(ok && proxyStats.ProxyType == proxyType) {
8893
proxyStats = &ProxyStatistics{
8994
ProxyType: proxyType,
9095
CurConns: metric.NewCounter(),

server/service.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ func NewService() (svr *Service, err error) {
111111
err = fmt.Errorf("Create dashboard web server error, %v", err)
112112
return
113113
}
114+
log.Info("Dashboard listen on %s:%d", config.ServerCommonCfg.BindAddr, config.ServerCommonCfg.DashboardPort)
114115
}
115116
return
116117
}

0 commit comments

Comments
 (0)