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
To simulate the problem, use the TCPView tool to close the connection once the StompClient is connected. To solve the problem I just added a try..except. Because de function fails, I can't use method Disconnect to force a new connection. TCPView.zip
OBS: I'm not use Synapse
function TStompClient.Connected: boolean;
begin
try
{$IFDEF USESYNAPSE}
Result := Assigned(FSynapseTCP) and FSynapseConnected;
{$ELSE}
// ClosedGracefully <> FTCP.Connected !!!
Result := Assigned(FTCP) and FTCP.Connected and (not FTCP.IOHandler.ClosedGracefully);
{$ENDIF}
except
Result := False;
end;
end;
The text was updated successfully, but these errors were encountered:
To simulate the problem, use the TCPView tool to close the connection once the StompClient is connected. To solve the problem I just added a try..except. Because de function fails, I can't use method Disconnect to force a new connection.
TCPView.zip
OBS: I'm not use Synapse
function TStompClient.Connected: boolean;
begin
try
{$IFDEF USESYNAPSE}
Result := Assigned(FSynapseTCP) and FSynapseConnected;
{$ELSE}
// ClosedGracefully <> FTCP.Connected !!!
Result := Assigned(FTCP) and FTCP.Connected and (not FTCP.IOHandler.ClosedGracefully);
{$ENDIF}
except
Result := False;
end;
end;
The text was updated successfully, but these errors were encountered: