Fix misbehavior around connection to slave node in pool

The idea behind this fix is following:
if u connect to slave node xenserver logic should redirect you to your master, so this code give u this ability. 
Since with current code if u change you master everything stops working since in front of slave it is not possible to perform any commands.