From 9ed7686b336eed7672d91ec4b2180e5d48a3fe80 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Tue, 27 Mar 2018 04:36:22 +0200 Subject: fixed timeuouts/retries --- code/ecp/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'code/ecp/core.c') diff --git a/code/ecp/core.c b/code/ecp/core.c index 549c403..ae348ac 100644 --- a/code/ecp/core.c +++ b/code/ecp/core.c @@ -679,7 +679,7 @@ static ssize_t _conn_send_open(ECPConnection *conn, ECPTimerItem *ti) { } ssize_t ecp_conn_send_open(ECPConnection *conn) { - return ecp_timer_send(conn, _conn_send_open, ECP_MTYPE_OPEN_REP, 1, 500); + return ecp_timer_send(conn, _conn_send_open, ECP_MTYPE_OPEN_REP, 3, 500); } int ecp_conn_handle_new(ECPSocket *sock, ECPConnection *parent, unsigned char *payload, size_t payload_size, ECPConnection **_conn) { @@ -743,7 +743,7 @@ ssize_t ecp_conn_handle_open(ECPConnection *conn, ecp_seq_t seq, unsigned char m pthread_mutex_lock(&conn->mutex); #endif int is_open = ecp_conn_is_open(conn); - if (!is_open) conn->flags |= ECP_CONN_FLAG_OPEN; + if (!is_open && (size >= 0)) conn->flags |= ECP_CONN_FLAG_OPEN; #ifdef ECP_WITH_PTHREAD pthread_mutex_unlock(&conn->mutex); #endif -- cgit v1.2.3