Skip to content

Commit

Permalink
HPCC-32767 Fix a couple -ve leaks handling exceptions in dafilesrv cl…
Browse files Browse the repository at this point in the history
…ient code

Signed-off-by: Jake Smith <jake.smith@lexisnexisrisk.com>
  • Loading branch information
jakesmith committed Oct 3, 2024
1 parent 812ffd4 commit 01a5ac7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions fs/dafsclient/rmtclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1239,13 +1239,13 @@ ISocket *connectDafs(SocketEndpoint &ep, unsigned timeoutms, const IPropertyTree
{
if (e->errorCode() == JSOCKERR_connection_failed)
{
e->Release();
if (ep.port == securitySettings.queryDaFileSrvSSLPort())
ep.port = securitySettings.queryDaFileSrvPort();
else
ep.port = securitySettings.queryDaFileSrvSSLPort();
if (!conAttempts)
throw;
e->Release();
}
else
throw;
Expand All @@ -1265,13 +1265,11 @@ ISocket *connectDafs(SocketEndpoint &ep, unsigned timeoutms, const IPropertyTree
if (e->errorCode() == DAFSERR_connection_failed)
{
// worth logging to help identify any ssl config issues ...
StringBuffer errmsg;
e->errorMessage(errmsg);
WARNLOG("%s", errmsg.str());
e->Release();
IWARNLOG(e, "connectDafs");
ep.port = securitySettings.queryDaFileSrvPort();
if (!conAttempts)
throw;
e->Release();
}
else
throw;
Expand Down

0 comments on commit 01a5ac7

Please sign in to comment.