Skip to content

Commit

Permalink
Merge pull request #124 from Envek/fix/auto-connect-after-code-reload
Browse files Browse the repository at this point in the history
Fix lazy connection after code reload in Rails
  • Loading branch information
wallyqs authored Jun 22, 2023
2 parents 794c16f + 69dc397 commit ee22560
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/nats/io/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,7 @@ def single_url_connect_used?
def send_command(command)
raise NATS::IO::ConnectionClosedError if closed?

establish_connection! unless status
establish_connection! if !status || (disconnected? && should_reconnect?)

@pending_size += command.bytesize
@pending_queue << command
Expand Down

0 comments on commit ee22560

Please sign in to comment.