提交 6d81e4c8 编写于 作者: F fatedier 提交者: GitHub

Merge pull request #325 from fatedier/dev

merge dev to master
# 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)
......
# 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)
......
......@@ -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
......@@ -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(),
......
......@@ -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
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册