fix replication always use write host
Merge pull request #2650 from Tradesparq/fix-replication

fix replication always use write host