mirror of
https://github.com/ICKelin/opennotr.git
synced 2025-09-26 20:01:13 +08:00
fix: fix compile error
This commit is contained in:
@@ -149,7 +149,7 @@ plugin:
|
||||
|
||||
准备好配置之后运行以下命令即可开始启动:
|
||||
|
||||
`docker run --privileged --net=host -v /opt/logs/opennotr:/opt/resty-upstream/logs -v /opt/data/opennotrd:/opt/conf -d opennotrd`
|
||||
`docker run --privileged --net=host -v /opt/logs/opennotr:/opt/resty-upstream/logs -v /opt/data/opennotrd:/opt/conf -d ickelin/opennotr:v1.0.4`
|
||||
|
||||
需要配置volume,将主机目录`/opt/data/opennotrd`挂载到容器的`/opt/conf`当中,`/opt/data/opennotrd`为在上一步当中创建的配置文件,证书目录。
|
||||
|
||||
|
@@ -158,18 +158,13 @@ func (s *Server) onConn(conn net.Conn) {
|
||||
s.sessMgr.AddSession(vip, sess)
|
||||
defer s.sessMgr.DeleteSession(vip)
|
||||
|
||||
rttInterval := time.NewTicker(time.Second * 10)
|
||||
for {
|
||||
select {
|
||||
case <-mux.CloseChan():
|
||||
rttInterval := time.NewTicker(time.Millisecond * 500)
|
||||
for range rttInterval.C {
|
||||
if mux.IsClosed() {
|
||||
logs.Info("session %v close", sess.conn.RemoteAddr().String())
|
||||
return
|
||||
|
||||
case <-rttInterval.C:
|
||||
rtt, _ := mux.Ping()
|
||||
logs.Debug("session: %s rtt: %4dms",
|
||||
sess.conn.RemoteAddr().String(), rtt.Milliseconds())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user