summaryrefslogtreecommitdiff
path: root/src/map/chrif.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/chrif.c')
-rw-r--r--src/map/chrif.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 479b328f5..d11604bc3 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -980,6 +980,17 @@ int chrif_parse(int fd)
if (fd == char_fd) {
printf("Map-server can't connect to char-server (connection #%d).\n", fd);
char_fd = -1;
+ check_connect_char_server(0, 0, 0, 0);
+ while (char_fd <= 0 || session[char_fd] == NULL) {
+ struct map_session_data *sd;
+ int idx;
+ for (idx = 0; idx <fd_max; idx++)
+ if ((session[idx] != NULL) && (sd = session[idx]->session_data) && sd && sd->state.auth)
+ clif_displaymessage(idx, "Map server is paused waiting for char server to return..");
+ flush_fifos();
+ sleep(10);
+ check_connect_char_server(0, 0, 0, 0);
+ }
}
close(fd);
delete_session(fd);