From d1c76f2608facbadaa0f5aeb197269868ba29899 Mon Sep 17 00:00:00 2001 From: Michal Simon Date: Tue, 17 Apr 2018 11:50:01 +0200 Subject: [PATCH] [XrdCl] Release SIDs on PostMaster::Send() failure. Make sure SIDs are release if PostMaster::Send() returns an error (e.g. due to problems with establishing the physical connection). --- src/XrdCl/XrdClMessageUtils.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/XrdCl/XrdClMessageUtils.cc b/src/XrdCl/XrdClMessageUtils.cc index 30fa0c93f15..ed3092c1ffc 100644 --- a/src/XrdCl/XrdClMessageUtils.cc +++ b/src/XrdCl/XrdClMessageUtils.cc @@ -116,6 +116,9 @@ namespace XrdCl log->Error( XRootDMsg, "[%s] Unable to send the message %s: %s", url.GetHostId().c_str(), msg->GetDescription().c_str(), st.ToString().c_str() ); + + // Release the SID as the request was never send + sidMgr->ReleaseSID( req->streamid ); delete msgHandler; delete list; return st;