fix server session close
fix server session loop