peer fsm patch to handle connect failure