Assuming that I can do ResetLastError() in OnStatus event hanler (e.g. when Reason is HR_Error, and LastError is WSAEISCONN) it would be nice to modify TBlockSocket.ExceptCheck() a little.
procedure TBlockSocket.ExceptCheck;
var
e: ESynapseError;
begin
FLastErrorDesc := GetErrorDescEx;
if (LastError <> 0) and (LastError <> WSAEINPROGRESS)
and (LastError <> WSAEWOULDBLOCK) then
begin
DoStatus(HR_Error, IntToStr(FLastError) + ',' + FLastErrorDesc);
if FRaiseExcept then // suggested modification: if FRaiseExcept and (FLastError <> 0) then
begin
e := ESynapseError.Create(Format('Synapse TCP/IP Socket error %d: %s',
[FLastError, FLastErrorDesc]));
e.ErrorCode := FLastError;
e.ErrorMessage := FLastErrorDesc;
raise e;
end;
end;
end;