* hack: Make NMAPReadConfigFile() retry in case store is not yet ready.

This commit is contained in:
trisk
2007-07-07 07:14:54 +00:00
parent 0607a6a5a6
commit 2f5f0343d9
+9 -1
View File
@@ -1274,8 +1274,16 @@ NMAPReadConfigFile(const unsigned char *file, unsigned char **output)
char buffer[CONN_BUFSIZE + 1];
CCode ccode;
BOOL retcode = FALSE;
int tries;
conn = NMAPConnect("127.0.0.1", NULL);
/* FIXME: caller should be notified when store is ready */
for (tries = 0; tries < 5; tries++) {
conn = NMAPConnect("127.0.0.1", NULL);
if (conn) {
break;
}
XplDelay(1000);
}
if (!conn) {
printf("could not connect to store\n");
return FALSE;