fix(StreamDispatcher): properly check that timestamp fits in 2^32-1 (#2325)

* fix a very strange bug caused by massive timestamps sent to discord

* remove 'gratituous' spaces
This commit is contained in:
David Siaw
2018-02-11 16:35:46 +09:00
committed by SpaceEEC
parent 3df3741922
commit 8ee2788baf

View File

@@ -284,7 +284,7 @@ class StreamDispatcher extends VolumeInterface {
const data = this.streamingData;
data.count++;
data.sequence = data.sequence < 65535 ? data.sequence + 1 : 0;
data.timestamp = data.timestamp + 4294967295 ? data.timestamp + 960 : 0;
data.timestamp = ((data.timestamp + 960) < 4294967295) ? data.timestamp + 960 : 0;
}
destroy(type, reason) {