drop connection when losing master role while trying to push an update

(to indicate to the client the update might or might not have succeeded)

Also check the other pull request with an alternative implementation.