]> gitweb.factorcode.org Git - factor.git/commitdiff
Try to read instead of write from a TCP connection. This gives 'Connection refused...
authorDoug Coleman <doug.coleman@gmail.com>
Fri, 26 Aug 2011 16:03:01 +0000 (11:03 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Fri, 26 Aug 2011 16:03:01 +0000 (11:03 -0500)
basis/io/sockets/unix/unix.factor

index 3f91c0e8b6e1afe3f152170f0f872720258a810a..fbfff5e9eb34527fa31ef4914a8f5b8fef874677 100644 (file)
@@ -50,7 +50,7 @@ M: object (get-remote-address) ( handle local -- sockaddr )
     SOL_SOCKET SO_OOBINLINE set-socket-option ;
 
 : wait-to-connect ( port -- )
-    dup handle>> handle-fd f 0 write
+    dup handle>> handle-fd f 0 read
     {
         { [ 0 = ] [ drop ] }
         { [ errno EAGAIN = ] [ dup +output+ wait-for-port wait-to-connect ] }