session: fix state check in switch pool