port close and session close