buttplug-csharp icon indicating copy to clipboard operation
buttplug-csharp copied to clipboard

Sorter has been destroyed with live tasks still in queue.

Open Tvde1 opened this issue 6 years ago • 2 comments

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.

Tvde1 avatar Nov 14 '18 19:11 Tvde1

I can reproduce it by spamming 1 in tutorial 7.

Tvde1 avatar Nov 14 '18 19:11 Tvde1

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.

qdot avatar Nov 23 '18 23:11 qdot