mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-09-02 16:31:56 +03:00
Remove clock goroutine
This is a followup for https://github.com/9seconds/mtg/issues/412 it makes sense to manage timers inplace instead of creating for new goroutines: saves memory
This commit is contained in:
@@ -63,7 +63,7 @@ func (suite *ConnTestSuite) TearDownTest() {
|
||||
}
|
||||
|
||||
func (suite *ConnTestSuite) makeConn() Conn {
|
||||
return NewConn(suite.ctx, suite.connMock, &Stats{
|
||||
return NewConn(suite.ctx, suite.connMock, Stats{
|
||||
k: 2.0,
|
||||
lambda: 0.01,
|
||||
})
|
||||
@@ -152,7 +152,7 @@ func (suite *ConnTestSuite) TestStopDoesNotDeadlockWhenStartIsWaiting() {
|
||||
ctx, cancel := context.WithCancel(suite.ctx)
|
||||
defer cancel()
|
||||
|
||||
c := NewConn(ctx, suite.connMock, &Stats{
|
||||
c := NewConn(ctx, suite.connMock, Stats{
|
||||
k: 2.0,
|
||||
lambda: 0.01,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user