Skip to content

Commit

Permalink
Merge pull request fatedier#325 from fatedier/dev
Browse files Browse the repository at this point in the history
merge dev to master
  • Loading branch information
fatedier authored May 20, 2017
2 parents 1126038 + faf584e commit 6d81e4c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frp

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

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

Expand Down
2 changes: 1 addition & 1 deletion README_zh.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frp

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

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

Expand Down
9 changes: 7 additions & 2 deletions server/metric.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,14 @@ type ServerStatistics struct {
TotalTrafficOut metric.DateCounter
CurConns metric.Counter

ClientCounts metric.Counter
// counter for clients
ClientCounts metric.Counter

// counter for proxy types
ProxyTypeCounts map[string]metric.Counter

// statistics for different proxies
// key is proxy name
ProxyStatistics map[string]*ProxyStatistics

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

proxyStats, ok := globalStats.ProxyStatistics[name]
if !ok {
if !(ok && proxyStats.ProxyType == proxyType) {
proxyStats = &ProxyStatistics{
ProxyType: proxyType,
CurConns: metric.NewCounter(),
Expand Down
1 change: 1 addition & 0 deletions server/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ func NewService() (svr *Service, err error) {
err = fmt.Errorf("Create dashboard web server error, %v", err)
return
}
log.Info("Dashboard listen on %s:%d", config.ServerCommonCfg.BindAddr, config.ServerCommonCfg.DashboardPort)
}
return
}
Expand Down

0 comments on commit 6d81e4c

Please sign in to comment.