Move session cleanup out of iscsiExecLogout() and keep it only in the CONN_STATE_CLOSE handler. The logout response must be fully sent before the session is removed; cleaning up during logout causes the daemon to hang because subsequent operations reference a nil session. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>