added 'closed' state to session, fixed Recv()