waitForMessage method
Implementation
Future<ButtplugServerMessage> waitForMessage(int id) async {
final completer = _waitingFutures[id];
if (completer == null) {
logError("No message with $id currently being waited on");
throw ButtplugMessageException("No message with $id currently being waited on");
}
try {
return await completer.future;
} finally {
_waitingFutures.remove(id);
}
}