diff options
author | Uros Majstorovic <majstor@majstor.org> | 2018-03-27 04:36:22 +0200 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2018-03-27 04:36:22 +0200 |
commit | 9ed7686b336eed7672d91ec4b2180e5d48a3fe80 (patch) | |
tree | be0ad92f70dd75b93ad29a60feb1fbe9696b2343 /code/ecp/core.c | |
parent | ef64f315409a23e6698f536e96ef56113ddff798 (diff) |
fixed timeuouts/retries
Diffstat (limited to 'code/ecp/core.c')
-rw-r--r-- | code/ecp/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 |