Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merging conflicts

  • Loading branch information...
commit 0bda829096aa476d9558ca17bed8ba8adf972c01 2 parents 6744162 + 90512c8
Thiago Morello authored
Showing with 7 additions and 7 deletions.
  1. +6 −6 lib/stomp/connection.rb
  2. +1 −1  spec/connection_spec.rb
View
12 lib/stomp/connection.rb
@@ -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?
@@ -99,7 +99,7 @@ def socket
begin
s = open_socket
@closed = false
-
+ # Open complete
headers = @connect_headers.clone
headers[:login] = @login
headers[:passcode] = @passcode
@@ -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
@@ -128,7 +128,7 @@ def socket
end
end
@socket = s
- return s;
+ return s
#end
end
@@ -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
View
2  spec/connection_spec.rb
@@ -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]
Please sign in to comment.
Something went wrong with that request. Please try again.