Index: uspace/srv/net/socket/socket_client.c
===================================================================
--- uspace/srv/net/socket/socket_client.c	(revision 21580dd3dd9a49828a6c8dd3988e651a60708c10)
+++ uspace/srv/net/socket/socket_client.c	(revision 1a0fb3f8aa71e3bb907eb17703615fc685752ca1)
@@ -71,4 +71,8 @@
 #define SOCKET_MAX_ACCEPTED_SIZE		0
 
+/** Default timeout for connections in microseconds.
+ */
+#define SOCKET_CONNECT_TIMEOUT	( 1 * 1000 * 1000 )
+
 /** Type definition of the socket specific data.
  *  @see socket
@@ -180,4 +184,5 @@
  *  Connects to the TCP module if necessary.
  *  @returns The TCP module phone.
+ *  @returns Other error codes as defined for the bind_service_timeout() function.
  */
 static int	socket_get_tcp_phone( void );
@@ -186,4 +191,5 @@
  *  Connects to the UDP module if necessary.
  *  @returns The UDP module phone.
+ *  @returns Other error codes as defined for the bind_service_timeout() function.
  */
 static int	socket_get_udp_phone( void );
@@ -262,5 +268,5 @@
 static int socket_get_tcp_phone( void ){
 	if( socket_globals.tcp_phone < 0 ){
-		socket_globals.tcp_phone = bind_service( SERVICE_TCP, 0, 0, SERVICE_TCP, socket_connection );
+		socket_globals.tcp_phone = bind_service_timeout( SERVICE_TCP, 0, 0, SERVICE_TCP, socket_connection, SOCKET_CONNECT_TIMEOUT );
 	}
 	return socket_globals.tcp_phone;
@@ -269,5 +275,5 @@
 static int socket_get_udp_phone( void ){
 	if( socket_globals.udp_phone < 0 ){
-		socket_globals.udp_phone = bind_service( SERVICE_UDP, 0, 0, SERVICE_UDP, socket_connection );
+		socket_globals.udp_phone = bind_service_timeout( SERVICE_UDP, 0, 0, SERVICE_UDP, socket_connection, SOCKET_CONNECT_TIMEOUT );
 	}
 	return socket_globals.udp_phone;
@@ -426,4 +432,5 @@
 			return EPFNOSUPPORT;
 	}
+	if( phone < 0 ) return phone;
 	// create a new socket structure
 	socket = ( socket_ref ) malloc( sizeof( socket_t ));
