Close connection after syncing (#5507).
Merge remote-tracking branch 'refs/remotes/drebs/bug/5507_close-connections-after-sync' into develop