Skip to content

Commit ebf7891

Browse files
committed
hotfix: ignore zodom vote update from mqtt if its id is not the current song id
1 parent 5a01481 commit ebf7891

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/main/kotlin/gent/zeus/guitar/mqtt/MqttImpl.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class MqttContext {
3333
val startTime = PlayerState.mutex.withLock { PlayerState.currentStartTime } ?: return@logExceptionWarn
3434

3535
val votesJson = jacksonObjectMapper().readValue<MqttVoteJson>(jsonString)
36+
if (votesJson.songId != id) return@logExceptionWarn
3637
publishTrack(id, startTime, votesJson.votesFor, votesJson.votesAgainst)
3738
}
3839

0 commit comments

Comments
 (0)