Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@reliable connections will infinite loop when max_reconnect_attempts are reached #10

Closed
gmallard opened this issue Apr 19, 2011 · 1 comment
Labels

Comments

@gmallard
Copy link

This was originally reported on codehaus Jira. The problem still exists in the current gem. See:

http://jira.codehaus.org/browse/STOMP-20

The fix suggested at the codehaus site is:

def transmit(command, headers = {}, body = '')
  # The transmit may fail so we may need to retry.
  while TRUE
      begin
          used_socket = socket
         _transmit(used_socket, command, headers, body)
         return
      rescue Stomp::Error::MaxReconnectAttempts => e
          raise
      rescue
          @failure = $!
          raise unless @reliable
          $stderr.print "transmit to #{@host} failed: #{$!}\n"
          end
      end
  end
@gmallard
Copy link
Author

gmallard commented May 7, 2011

Fix is on master: e7da3a6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant