uWebSockets C++ error on send(): cork buffer must not be acquired without checking cancork
I’m developing a websoscket server for an embedded system. The requirements are very simple: send updates to a list of signals ids the webapp subscribes to. Everything works fine until the crash happens.
The problem seems to be part of the corking mechanism and I’ve tried to reproduce it under different conditions but the problem still occurs.
In my implementation I have a custom pub/sub because I want to deliver more signal updates at once in one message: this is realized in a separate thread that sends asynchronous messages to the connected clients with a frequency of 10 times per second (with the available updates).
The problem seems to happen when there is a collision with the send and message callback.