If sync finishes during shutdown, check if there is a context error in the deferred go routine before rewinding the event.