Skip to content

Commit

Permalink
Fix: For timing and default config
Browse files Browse the repository at this point in the history
  • Loading branch information
Grabt234 committed Jul 8, 2024
1 parent d5d06ba commit 31862fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"LoggingConfig": {
"LoggingLevel": "Debug",
"LogToFile": "True",
"LogToFile": "False",
"LogToConsole": "True"
},
"TCPRxConfig": {
Expand Down
8 changes: 4 additions & 4 deletions Routines/ChunkRouter.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (s *ChunkTypeToChannelMap) GetChannelData(chunkTypeKey string) (dataString
return "", false
}

var timeoutCh = time.After(250 * time.Millisecond)
var timeoutCh = time.After(5 * time.Millisecond)

select {
case data := <-chunkRoutingChannel:
Expand Down Expand Up @@ -107,9 +107,9 @@ func (s *ChunkTypeToChannelMap) TryGetChannel(chunkType string) (extractedChanne
case <-lockAcquired:
// Lock was acquired
return extractedChannel, exists
case <-time.After(1 * time.Millisecond):
case <-time.After(5 * time.Millisecond):
// Lock was not acquired, sleep and retry
time.Sleep(1 * time.Millisecond)
time.Sleep(5 * time.Millisecond)
}
}
}
Expand Down Expand Up @@ -207,7 +207,7 @@ func (s *ChunkTypeToChannelMap)HandleSignalTransmissions(loggingChannel chan map
}()

// While also limiting this with a timeout procedure
var chTimeout = time.After(250 * time.Millisecond)
var chTimeout = time.After(5 * time.Millisecond)

// And see which finihsed first
select {
Expand Down

0 comments on commit 31862fc

Please sign in to comment.