buttplug-csharp
buttplug-csharp copied to clipboard
Sorter has been destroyed with live tasks still in queue.
I'm using the last tutorial but with a websocket connection. I've connected and started + stopped scanning. Then I started scanning again and I got hit with this error.
It happens at the line await client.StartScanningAsync();
I didn't get any useful stacktrace.
I can reproduce it by spamming 1
in tutorial 7.
Hmm. I can't seem to repro this using a websocket connection and a 0.2.3 buttplug server. Is that the setup you're using?
Even without the repo, this is a problem in the example that I should fix anyways. Pretty much every awaited call in ButtplugClient should be in a try block (which I neglected to put in the examples). The reason this is throwing is that for some reason the connector is being destroyed, and taking the message sorter with it. This means anything waiting on a message back from the server will throw, as all of those outstanding actions will fail.