diff --git a/src/etcp.c b/src/etcp.c index 5e4345a..961914d 100644 --- a/src/etcp.c +++ b/src/etcp.c @@ -284,7 +284,7 @@ void etcp_conn_reset(struct ETCP_CONN* etcp) { queue_resume_callback(etcp->input_send_q); queue_resume_callback(etcp->input_wait_ack); queue_resume_callback(etcp->recv_q); -// queue_resume_callback(etcp->ack_q); + queue_resume_callback(etcp->ack_q); etcp->tx_state=ETCP_TX_STATE_DATA_WAIT; diff --git a/src/etcp_connections.c b/src/etcp_connections.c index 941bbbe..93476ad 100644 --- a/src/etcp_connections.c +++ b/src/etcp_connections.c @@ -899,9 +899,11 @@ static void etcp_connections_read_callback_socket(socket_t sock, void* arg) { } *ack_repl_hdr=(void*)&pkt->data[0]; // Set response code: 0x03 (with reset) or 0x05 (without reset) - if (send_reset || new_conn || ack_hdr->code == ETCP_INIT_REQUEST) { + if (send_reset != 0 || new_conn != 0 || ack_hdr->code == ETCP_INIT_REQUEST) { + DEBUG_TRACE(DEBUG_CATEGORY_CONNECTION, "send init_response with reset"); ack_repl_hdr->code = ETCP_INIT_RESPONSE; // 0x03 - with reset } else { + DEBUG_TRACE(DEBUG_CATEGORY_CONNECTION, "send init_response without reset"); ack_repl_hdr->code = ETCP_INIT_RESPONSE_NOINIT; // 0x05 - without reset } *(uint64_t*)ack_repl_hdr->id = htobe64(e_sock->instance->node_id);