this should be `session.close if @session`