added error checking after session_loop
fixed isConnReset call
Merge pull request #4 from kargakis/master

added error checking after session_loop