Try to read instead of write from a TCP connection. This gives 'Connection refused' instead of 'Broken pipe', which is much more useful.
							parent
							
								
									32261681f8
								
							
						
					
					
						commit
						b7314a68d8
					
				|  | @ -50,7 +50,7 @@ M: object (get-remote-address) ( handle local -- sockaddr ) | ||||||
|     SOL_SOCKET SO_OOBINLINE set-socket-option ; |     SOL_SOCKET SO_OOBINLINE set-socket-option ; | ||||||
| 
 | 
 | ||||||
| : wait-to-connect ( port -- ) | : wait-to-connect ( port -- ) | ||||||
|     dup handle>> handle-fd f 0 write |     dup handle>> handle-fd f 0 read | ||||||
|     { |     { | ||||||
|         { [ 0 = ] [ drop ] } |         { [ 0 = ] [ drop ] } | ||||||
|         { [ errno EAGAIN = ] [ dup +output+ wait-for-port wait-to-connect ] } |         { [ errno EAGAIN = ] [ dup +output+ wait-for-port wait-to-connect ] } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue