Revert "remove setTimeout form tryFlush"

This reverts commit 0072c540e6ee42bca4e37c5e43e19411c2c77d3b.