def disconnect
      control_request LS_op: :destroy if @stream_connection

      @processing_thread.join 5 if @processing_thread
    ensure
      @stream_connection.disconnect if @stream_connection
      @processing_thread.exit if @processing_thread

      @subscriptions.each { |subscription| subscription.after_control_request :stop }
      @subscriptions = []

      @processing_thread = @stream_connection = nil
    end
def disconnect
      control_request LS_op: :destroy if @stream_connection

      @processing_thread.join 5 if @processing_thread
    ensure
      @stream_connection.disconnect if @stream_connection
      @processing_thread.exit if @processing_thread

      @subscriptions.each { |subscription| subscription.after_control_request :stop }
      @subscriptions = []

      @processing_thread = @stream_connection = nil
    end
Disconnects this Lightstreamer session and terminates the session on the server. All worker threads are exited,
 and all subscriptions created during the connected session can no longer be used.