etcdserver: minor cleanup on publish func