From a7f85567a3e850fba0c44571453d2852ab1a09be Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Tue, 13 May 2008 10:28:39 -0400 Subject: [PATCH] Bug #15884: Remove useless sleep()'s from the connection code. For network transports, there's enough delay in the network layer already without adding more. For local transports, just hurry up and fail if the server isn't there. --- modules/im/ximcp/imTrans.c | 3 --- src/ConnDis.c | 5 +---- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/modules/im/ximcp/imTrans.c b/modules/im/ximcp/imTrans.c index a239219b..cb17ca06 100644 --- a/modules/im/ximcp/imTrans.c +++ b/modules/im/ximcp/imTrans.c @@ -77,10 +77,7 @@ _XimTransConnect( spec->trans_conn = NULL; if (connect_stat == TRANS_TRY_CONNECT_AGAIN) - { - sleep(1); continue; - } else break; } diff --git a/src/ConnDis.c b/src/ConnDis.c index f919d51d..e61e0f05 100644 --- a/src/ConnDis.c +++ b/src/ConnDis.c @@ -42,6 +42,7 @@ in this Software without prior written authorization from The Open Group. #include #include #include +#include #if !defined(WIN32) #ifndef Lynx @@ -389,10 +390,7 @@ _X11TransConnectDisplay ( trans_conn = NULL; if (connect_stat == TRANS_TRY_CONNECT_AGAIN) - { - sleep(1); continue; - } else break; } @@ -409,7 +407,6 @@ _X11TransConnectDisplay ( { _X11TransClose(trans_conn); trans_conn = NULL; - sleep(1); if (saddr) { free ((char *) saddr);