diff options
author | jsorg71 <jsorg71> | 2009-08-19 18:24:38 +0000 |
---|---|---|
committer | jsorg71 <jsorg71> | 2009-08-19 18:24:38 +0000 |
commit | b836ece1f2c1c3f776ff00e00e1c0a89563e3c82 (patch) | |
tree | 6a084e6ce509e99c0bc58d7e026f4a38f0441281 /xup/xup.c | |
parent | df8527b2517dd3fc6794666a859d2453951d03ad (diff) | |
download | xrdp-proprietary-b836ece1f2c1c3f776ff00e00e1c0a89563e3c82.tar.gz xrdp-proprietary-b836ece1f2c1c3f776ff00e00e1c0a89563e3c82.zip |
change the way xup tried to connect repeatedly
Diffstat (limited to 'xup/xup.c')
-rw-r--r-- | xup/xup.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -156,14 +156,13 @@ lib_mod_connect(struct mod* mod) } make_stream(s); g_sprintf(con_port, "%s", mod->port); - mod->sck = g_tcp_socket(); - mod->sck_obj = g_create_wait_obj_from_socket(mod->sck, 0); - g_tcp_set_non_blocking(mod->sck); - g_tcp_set_no_delay(mod->sck); mod->sck_closed = 0; i = 0; while (1) { + mod->sck = g_tcp_socket(); + g_tcp_set_non_blocking(mod->sck); + g_tcp_set_no_delay(mod->sck); mod->server_msg(mod, "connecting...", 0); error = g_tcp_connect(mod->sck, mod->ip, con_port); if (error == -1) @@ -192,6 +191,8 @@ lib_mod_connect(struct mod* mod) { break; } + g_tcp_close(mod->sck); + mod->sck = 0; i++; if (i >= 4) { @@ -230,6 +231,7 @@ lib_mod_connect(struct mod* mod) else { mod->server_msg(mod, "connected ok", 0); + mod->sck_obj = g_create_wait_obj_from_socket(mod->sck, 0); } LIB_DEBUG(mod, "out lib_mod_connect"); return 0; |