issue: 425607 fix coverity error in ServerSession:can_close

Change-Id: I6a0abe2f3c8649e191331a0d858fe3d102e022d1