You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
void connectionHandler(void* parameter, CS104_Connection connection, CS104_ConnectionEvent event)
{
lock();
if (event == CS104_CONNECTION_OPENED) active = true;
if (event == CS104_CONNECTION_CLOSED) active = false;
unlock();
}
// somewhwre ...
CS104_Connection_setConnectionHandler(conn, connectionHandler, NULL);
CS104_Connection_connectAsync(conn);
// ...
lock();
if (active) CS104_Connection_sendStartDT(conn);
unlock();
This code works well in version 2.3.1. But in version 2.3.2 sometimes there is a crash on the call to CS104_Connection_sendStartDT(). In version 2.3.1 the handler is called before the socket is closed, but in version 2.3.2 it is different. We can get caught between closing the socket and calling the handler, and crach. How to call sendStartDT correctly?
The text was updated successfully, but these errors were encountered:
Some code similar to this:
This code works well in version 2.3.1. But in version 2.3.2 sometimes there is a crash on the call to CS104_Connection_sendStartDT(). In version 2.3.1 the handler is called before the socket is closed, but in version 2.3.2 it is different. We can get caught between closing the socket and calling the handler, and crach. How to call sendStartDT correctly?
The text was updated successfully, but these errors were encountered: