Permalink
Browse files

restrict to IPv4

  • Loading branch information...
mojombo committed Feb 11, 2010
1 parent 7a29594 commit e2037f21fdc70bfca0e45a0b7cea5b0f8eca732b
Showing with 5 additions and 1 deletion.
  1. +4 −0 History.txt
  2. +1 −1 lib/bertrpc/action.rb
View
@@ -1,3 +1,7 @@
+=
+ * Bug fixes
+ * Restrict to IPv4
+
= 1.2.0 / 2010-02-09
* Enhancements
* Better timeouts courtesy of select(2)
View
@@ -70,7 +70,7 @@ def transaction(bert_request)
# +port+ Integer port of the target TCP server
# +timeout+ Optional Integer (in seconds) of the read timeout
def connect_to(host, port, timeout = nil)
- addr = Socket.getaddrinfo(host, nil)
+ addr = Socket.getaddrinfo(host, nil, Socket::AF_INET)
sock = Socket.new(Socket.const_get(addr[0][0]), Socket::SOCK_STREAM, 0)
sock.setsockopt Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1

0 comments on commit e2037f2

Please sign in to comment.