Adding additional check to if shutdown is already in process
Merge pull request #2960 from moizjv/fix-2959

Adding additional check to if shutdown is already in process