xrdp-next/xrdp-0.6.1-vnc-delay.patch
2014-12-22 18:11:55 +11:00

28 lines
760 B
Diff

diff -ruN xrdp-v0.6.1-vanilla/vnc/vnc.c xrdp-v0.6.1/vnc/vnc.c
--- xrdp-v0.6.1-vanilla/vnc/vnc.c 2013-11-10 07:11:15.000000000 +1100
+++ xrdp-v0.6.1/vnc/vnc.c 2014-12-22 17:49:57.474144440 +1100
@@ -846,6 +846,7 @@
int error;
int i;
int check_sec_result;
+ int count;
v->server_msg(v, "started connecting", 0);
check_sec_result = 1;
@@ -870,7 +871,14 @@
v->sck_closed = 0;
g_sprintf(text, "connecting to %s %s", v->ip, con_port);
v->server_msg(v, text, 0);
- error = g_tcp_connect(v->sck, v->ip, con_port);
+
+ for (count = 0; count < 10; count++) {
+ error = g_tcp_connect(v->sck, v->ip, con_port);
+ if (error == 0)
+ break;
+ g_sleep(1000);
+ }
+
if (error == 0)
{
v->server_msg(v, "tcp connected", 0);