Redundancy. Master and Back-up both showing Active?

Hi,

I’m messing around with redundancy and under a connection failure test between the master and backup, I had both the master and backup showing active at the same time. Is this correct or have I incorrectly set up redundancy?

If I use the link on the status page to force a fail over, this works correctly showing the Master as down and the back up as Active.

Is there a way to script this so that I can achieve the same functionality based on the network connection on the Master only?

Thanks.