refactoring  closing session in finally block . The socket was closed aslo the current running session when duplicate session was appeared .