# File ./session.rb, line 505
    def release
      begin
        @connection.on_connection_exception do
          #Do nothing...we are shutting down
        end
        @connection.send(Jabber::Protocol::Presence.gen_unavailable(id))
        @connection.send(Jabber::Protocol.gen_close_stream)
      rescue
        #ignore error
      end
      begin
        @connection.close
      rescue
        #ignore error
      end
    end