diff options
-rw-r--r-- | code/ecp/core.c | 4 | ||||
-rw-r--r-- | code/ecp/vconn/vconn.c | 2 |
2 files changed, 3 insertions, 3 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 diff --git a/code/ecp/vconn/vconn.c b/code/ecp/vconn/vconn.c index 9549598..d7e2c02 100644 --- a/code/ecp/vconn/vconn.c +++ b/code/ecp/vconn/vconn.c @@ -94,7 +94,7 @@ static ssize_t vconn_open(ECPConnection *conn) { if (conn_next == NULL) return ECP_ERR; - ssize_t _rv = ecp_timer_send(conn_next, _vconn_send_open, ECP_MTYPE_KGET_REP, 3, 3000); + ssize_t _rv = ecp_timer_send(conn_next, _vconn_send_open, ECP_MTYPE_KGET_REP, 3, 1000); if (_rv < 0) return _rv; return _rv; |