def unsubscribe(channel, &callback)
      if callback
        @channels[channel].callbacks.delete(callback)
        remove_channel(channel) if @channels[channel].callbacks.empty?
      else
        remove_channel(channel)
      end

      stop if @channels.empty?
      @status
    end
def unsubscribe(channel, &callback)
      if callback
        @channels[channel].callbacks.delete(callback)
        remove_channel(channel) if @channels[channel].callbacks.empty?
      else
        remove_channel(channel)
      end

      stop if @channels.empty?
      @status
    end
unsubscribes from a channel

 @example Unsubscribing from a channel
   client = MessageBus::HTTPClient.new('http://some.test.com')
   callback = -> { |payload| puts payload }
   client.subscribe("/test", &callback)
   client.unsubscribe("/test")

 If a callback is given, only the specific callback will be unsubscribed.

 @example Unsubscribing a callback from a channel
   client.unsubscribe("/test", &callback)

 When the client does not have any channels left, it will stop polling and
 waits until a new subscription is started.

 @param channel [String] channel to unsubscribe
 @yield [data, global_id, message_id] specific callback to unsubscribe

 @return [Integer] the current status of the client