mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-26 20:06:28 -08:00
Fixed index out of bounds on data feed configs (#389)
This commit is contained in:
1 parent
fbf509ec79
commit
3dd94b3aa3
2 files changed
+6
-2
No files matched your search
@@ -18,7 +18,6 @@ public class ConnectionContext {
|
||||
|
||||
private final List<Integer> subscribedTopics = new ArrayList<>();
|
||||
|
||||
|
||||
private boolean useSerial = false;
|
||||
private boolean useAutoBone = false;
|
||||
|
||||
@@ -30,6 +29,11 @@ public class ConnectionContext {
|
||||
return dataFeedTimers;
|
||||
}
|
||||
|
||||
public void clearDataFeeds() {
|
||||
this.dataFeedConfigList.clear();
|
||||
this.dataFeedTimers.clear();
|
||||
}
|
||||
|
||||
public List<Integer> getSubscribedTopics() {
|
||||
return subscribedTopics;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ public class DataFeedHandler extends ProtocolHandler<DataFeedMessageHeader> {
|
||||
return;
|
||||
int dataFeeds = req.dataFeedsLength();
|
||||
|
||||
conn.getContext().getDataFeedConfigList().clear();
|
||||
conn.getContext().clearDataFeeds();
|
||||
for (int i = 0; i < dataFeeds; i++) {
|
||||
// Using the object api here because we need to copy from the buffer
|
||||
// anyway so
|
||||
|
||||
Reference in new issue
Block a user