<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,8 @@
+= 1.7.2 (2009-04-12)
+
+* Rollback socket timeout optimization.  It does not work on all operating systems
+  and was a support headache.
+
 = 1.7.1 (2009-03-28)
 
 * Performance optimizations: </diff>
      <filename>History.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -33,7 +33,7 @@ class MemCache
   ##
   # The version of MemCache you are using.
 
-  VERSION = '1.7.1'
+  VERSION = '1.7.2'
 
   ##
   # Default options for the cache object.
@@ -1015,30 +1015,30 @@ class MemCache
     end
 
     def connect_to(host, port, timeout=nil)
-      addr = Socket.getaddrinfo(host, nil)
-      sock = Socket.new(Socket.const_get(addr[0][0]), Socket::SOCK_STREAM, 0)
-
+      s = TCPSocket.new(host, port, 0)
       if timeout
-        secs = Integer(timeout)
-        usecs = Integer((timeout - secs) * 1_000_000)
-        optval = [secs, usecs].pack(&quot;l_2&quot;)
-        sock.setsockopt Socket::SOL_SOCKET, Socket::SO_RCVTIMEO, optval
-        sock.setsockopt Socket::SOL_SOCKET, Socket::SO_SNDTIMEO, optval
-
-        # Socket timeouts don't work for more complex IO operations
-        # like gets which lay on top of read.  We need to fall back to
-        # the standard Timeout mechanism.
-        sock.instance_eval &lt;&lt;-EOR
+        s.instance_eval &lt;&lt;-EOR
           alias :blocking_gets :gets
-          def gets
+          def gets(*args)
+            MemCacheTimer.timeout(#{timeout}) do
+              self.blocking_gets(*args)
+            end
+          end
+          alias :blocking_read :read
+          def read(*args)
+            MemCacheTimer.timeout(#{timeout}) do
+              self.blocking_read(*args)
+            end
+          end
+          alias :blocking_write :write
+          def write(*args)
             MemCacheTimer.timeout(#{timeout}) do
-              self.blocking_gets
+              self.blocking_write(*args)
             end
           end
         EOR
       end
-      sock.connect(Socket.pack_sockaddr_in(port, addr[0][3]))
-      sock
+      s
     end
 
     ##</diff>
      <filename>lib/memcache.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 Gem::Specification.new do |s|
 	s.name = 'memcache-client'
-	s.version = '1.7.1'
+	s.version = '1.7.2'
 	s.authors = ['Eric Hodel', 'Robert Cottrell', 'Mike Perham']
 	s.email = 'mperham@gmail.com'
 	s.homepage = 'http://github.com/mperham/memcache-client'</diff>
      <filename>memcache-client.gemspec</filename>
    </modified>
    <modified>
      <diff>@@ -89,3 +89,13 @@ get:ruby:memcache-client         3.290000   0.640000   3.930000 (  4.242648)
 multiget:ruby:memcache-client    1.640000   0.250000   1.890000 (  2.003687)
 missing:ruby:memcache-client     1.940000   0.450000   2.390000 (  2.619675)
 mixed:ruby:memcache-client       5.360000   1.100000   6.460000 (  7.040998)
+
+== 1.7.2, timeout, 1.8.6, SystemTimer, native binary search
+                                     user     system      total        real
+set:plain:memcache-client        3.260000   0.590000   3.850000 (  4.067382)
+set:ruby:memcache-client         3.370000   0.590000   3.960000 (  4.364004)
+get:plain:memcache-client        6.740000   1.240000   7.980000 (  8.586676)
+get:ruby:memcache-client         6.780000   1.210000   7.990000 (  8.423400)
+multiget:ruby:memcache-client    3.480000   0.540000   4.020000 (  4.288633)
+missing:ruby:memcache-client     3.250000   0.590000   3.840000 (  4.043602)
+mixed:ruby:memcache-client      10.150000   1.810000  11.960000 ( 12.372054)</diff>
      <filename>performance.txt</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e047a05fb640275e145850a2f4162fa130a29c54</id>
    </parent>
  </parents>
  <author>
    <name>Mike Perham</name>
    <email>mperham@gmail.com</email>
  </author>
  <url>http://github.com/bmizerany/memcache-client/commit/f85d34a4fede48fd0f450184505938127476c8a0</url>
  <id>f85d34a4fede48fd0f450184505938127476c8a0</id>
  <committed-date>2009-04-12T18:35:40-07:00</committed-date>
  <authored-date>2009-04-12T18:35:40-07:00</authored-date>
  <message>Rollback socket timeouts.  Release 1.7.2.</message>
  <tree>e5af60a56a42a9cc2cad02807fc98077e89ad055</tree>
  <committer>
    <name>Mike Perham</name>
    <email>mperham@gmail.com</email>
  </committer>
</commit>
