Changed logic so that only master sends pubnub keep alive messages.