forked from Silverfish/proton-bridge
If sync finishes during shutdown, check if there is a context error in the deferred go routine before rewinding the event.
If sync finishes during shutdown, check if there is a context error in the deferred go routine before rewinding the event.