send msg when the beacon exit or is closed.