Change-Id: I7df2af3ee61cd58d5aa840cfead21578d14d6d5d
Signed-off-by: haken.kim <haken.kim@samsung.com>
qemu_set_nonblock(sock);
set_eventcast_connection_status(CONNECTING);
-
+ int conn_err_count = 0;
while (1) {
ret = connect(sock, (struct sockaddr *)&addr, sizeof(addr));
continue;
} else if (connection_errno == EALREADY) {
LOG_INFO("a previous connection has not yet been completed\n");
+ if(conn_err_count++ > 50){
+ LOG_INFO("too much waiting. connect failure\n");
+ ret = -connection_errno;
+ break;
+ }
ret = 0;
continue;
} else if (connection_errno == EISCONN) {