fix PhEDEx uploader closing block
Merge pull request #4930 from ticoann/phexdex_close_fix

fix PhEDEx uploader closing block