Fixed bug in session.py when a disconnection was caused by a locally generated error code

darcs-hash:20090213112013-58103-0bcc3987fded1bf92861cfe8ef04829c192a7169