Allenxuxu / gev

🚀Gev is a lightweight, fast non-blocking TCP network library / websocket server based on Reactor mode. Support custom protocols to quickly and easily build high-performance servers.
MIT License
1.73k stars 194 forks source link

Server.RunEvery: 参数传递错误 #9

Closed RussellLuo closed 5 years ago

RussellLuo commented 5 years ago

当前 Server.RunEvery 的实现:

func (s *Server) RunEvery(d time.Duration, f func()) *timingwheel.Timer {
    return s.timingWheel.ScheduleFunc(&everyScheduler{Interval: time.Second}, f)
}

结构体 everyScheduler 中的 Interval 字段应该使用 d 😃

Allenxuxu commented 5 years ago

👍 感谢大佬指出!

Allenxuxu commented 5 years ago

已经修复了,感谢大佬关注😄

RussellLuo commented 5 years ago

相互学习 :smile: