]> gitweb.factorcode.org Git - factor.git/commitdiff
redis: adding a read timeout to the socket.
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 10 Jul 2015 16:31:21 +0000 (09:31 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 10 Jul 2015 16:31:21 +0000 (09:31 -0700)
extra/redis/redis.factor

index f1a2da9974ce227600ce956cf84b9b0422c707e7..53c04f803d77a770c5be863662ad0c2d64668aa9 100644 (file)
@@ -102,7 +102,8 @@ CONSTANT: default-redis-port 6379
 
 : redis-do-connect ( redis -- stream )
     [ host>> ] [ port>> ] [ encoding>> ] tri
-    [ <inet> ] dip <client> drop ;
+    [ <inet> ] dip <client> drop
+    1 minutes over set-timeout ;
 
 : with-redis ( redis quot -- )
     [