Possible fix for flaky graceful shutdown test.