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
It is possible to open a connection and, before the FConnection is assigned, the status is set to wsConnected. Calling Send raises an AV because of that:
procedureTCrossWebSocket.Send(const AData: string;
const ACallback: TWsClientCallback);
beginif (GetStatus = wsConnected) then
FConnection.WsSend(AData, ACallback); // FConnection is nil hereend;
Local Variables:
This is an issue in a multi-threading environment. My suggestion would be to lock the access to the FConnection field or check if FConnection is assigned. Thanks!