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
function SSLAvailable: Boolean; is not thread safe, because Initialized is set early and when second thread check SSLAvailable too quick, SSPI is not set, but Initialized is set.
So second thread crash with AV on SSPI.something ( in my case in SSPI.AcquireCredentialsHandle).
Maybe can be solve dirty with function SSLAvailable: Boolean; var init: function: PSecurityFunctionTable; stdcall; begin Result := Initialized; SSPError := 0; if not Initialized or (SSPI = nil) then {SSPI = nil can be when SSL is inicializing in threads and SSPI is not assigned yet} begin {$IFDEF LOG}WriteLn('SSLAvailable');{$ENDIF} Initialized := True;
The text was updated successfully, but these errors were encountered:
function SSLAvailable: Boolean; is not thread safe, because Initialized is set early and when second thread check SSLAvailable too quick, SSPI is not set, but Initialized is set.
So second thread crash with AV on SSPI.something ( in my case in SSPI.AcquireCredentialsHandle).
Maybe can be solve dirty with
function SSLAvailable: Boolean; var init: function: PSecurityFunctionTable; stdcall; begin Result := Initialized; SSPError := 0; if not Initialized or (SSPI = nil) then {SSPI = nil can be when SSL is inicializing in threads and SSPI is not assigned yet} begin {$IFDEF LOG}WriteLn('SSLAvailable');{$ENDIF} Initialized := True;
The text was updated successfully, but these errors were encountered: