Forwarding to dev list.

Glenn

Begin forwarded message:

From: Gabor Veszi <[EMAIL PROTECTED]>
Date: July 25, 2008 7:24:30 AM PDT
To: [EMAIL PROTECTED]
Subject: [xmpp4r patch] really try next SRV on failed connect

Hi!

We ran into a problem when xmpp4r didn't try to connect to our secondary XMPP server (we have multiple SRV records in our DNS server for _xmpp-client._tcp.domain.tld). It seems that you need to catch Errno:ECONNREFUSED in the Jabber.connect function to get it to play nice.

Cheers,
Gabor

diff --git a/lib/xmpp4r/client.rb b/lib/xmpp4r/client.rb
index 9b6d5d0..08ce9b0 100644
--- a/lib/xmpp4r/client.rb
+++ b/lib/xmpp4r/client.rb
@@ -57,7 +57,7 @@ module Jabber
              connect(record.target.to_s, record.port)
              # Success
              return self
-            rescue SocketError
+            rescue SocketError, Errno::ECONNREFUSED
              # Try next SRV record
            end
          }


--
Glenn Rempe
[EMAIL PROTECTED]


Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Xmpp4r-devel mailing list
Xmpp4r-devel@gna.org
https://mail.gna.org/listinfo/xmpp4r-devel

Reply via email to