Skip to content

Commit

Permalink
Merging conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Thiago Morello committed Dec 29, 2009
2 parents 6744162 + 90512c8 commit 0bda829
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions lib/stomp/connection.rb
Expand Up @@ -90,7 +90,7 @@ def socket
# Need to look into why the following synchronize does not work.
#@read_semaphore.synchronize do

s = @socket;
s = @socket

s = nil if closed?

Expand All @@ -99,7 +99,7 @@ def socket
begin
s = open_socket
@closed = false

# Open complete
headers = @connect_headers.clone
headers[:login] = @login
headers[:passcode] = @passcode
Expand All @@ -113,11 +113,11 @@ def socket
@failure = $!
s = nil
raise unless @reliable
$stderr.print "connect to #{@host} failed: #{$!} will retry(##{@connection_attempts}) in #{@reconnect_delay}\n";
$stderr.print "connect to #{@host} failed: #{$!} will retry(##{@connection_attempts}) in #{@reconnect_delay}\n"

raise "Max number of reconnection attempts reached" if max_reconnect_attempts?

sleep(@reconnect_delay);
sleep(@reconnect_delay)

@connection_attempts += 1

Expand All @@ -128,7 +128,7 @@ def socket
end
end
@socket = s
return s;
return s
#end
end

Expand Down Expand Up @@ -448,7 +448,7 @@ def transmit(command, headers = {}, body = '')
rescue
@failure = $!
raise unless @reliable
$stderr.print "transmit to #{@host} failed: #{$!}\n";
$stderr.print "transmit to #{@host} failed: #{$!}\n"
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/connection_spec.rb
Expand Up @@ -312,7 +312,7 @@ class SSLContext
@connection.close_socket.should be_true
end
end

describe "when checking if max reconnect attempts have been reached" do
it "should return false if not using failover" do
host = @parameters[:hosts][0]
Expand Down

0 comments on commit 0bda829

Please sign in to comment.