Skip to content

Commit

Permalink
[XrdEc] Make sure the global status is checked before closing the dat…
Browse files Browse the repository at this point in the history
…a object.
  • Loading branch information
simonmichal committed Jan 20, 2021
1 parent 1537c5d commit fbc9b4f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/XrdEc/XrdEcReader.cc
Expand Up @@ -42,7 +42,6 @@
#include <iterator>
#include <numeric>
#include <tuple>
#include <iostream>

namespace XrdEc
{
Expand Down
8 changes: 7 additions & 1 deletion src/XrdEc/XrdEcStrmWriter.cc
Expand Up @@ -172,7 +172,6 @@ namespace XrdEc
//----------------------------------------------
// Select another server
//----------------------------------------------
size_t srvid;
if( !servers->dequeue( srvid ) ) return; // if there are no more servers we simply fail
zip = *dataarchs[srvid];
//----------------------------------------------
Expand Down Expand Up @@ -253,6 +252,13 @@ namespace XrdEc
//---------------------------------------------------------------------------
void StrmWriter::CloseImpl( XrdCl::ResponseHandler *handler )
{
//-------------------------------------------------------------------------
// First, check the global status, if we are in an error state just
// fail the request.
//-------------------------------------------------------------------------
XrdCl::XRootDStatus gst = global_status.get();
if( !gst.IsOK() ) return ScheduleHandler( handler, gst );

const size_t size = objcfg.plgr.size();
//-------------------------------------------------------------------------
// prepare the metadata (the Central Directory of each data ZIP)
Expand Down

0 comments on commit fbc9b4f

Please sign in to comment.