lib/grumlin/transport.rb in grumlin-0.4.0 vs lib/grumlin/transport.rb in grumlin-0.5.0

- old
+ new

@@ -18,11 +18,11 @@ def connected? @connected end - def connect # rubocop:disable Metrics/MethodLength, Metrics/AbcSize + def connect # rubocop:disable Metrics/AbcSize, Metrics/MethodLength raise AlreadyConnectedError if connected? @connection = Async::WebSocket::Client.connect(Async::HTTP::Endpoint.parse(@url), **@client_options) @response_task = @parent.async do @@ -54,10 +54,10 @@ raise NotConnectedError unless connected? @request_channel << message end - def close # rubocop:disable Metrics/MethodLength + def close return unless connected? @request_channel.close @request_task.wait