**Describe the bug**

After the client sends a large number of packets to NanoMQ, NanoMQ will fall into a circular waiting state where the MQTT port is still open, but any new requests will not be responded to.

**Expected behavior**

NanoMQ should revert to the normal receive state after receiving and processing any input message to wait for subsequent requests.

**Actual Behavior**

But, NanoMQ seems to be stuck in a waiting loop, as you can see from the logs it keeps printing "send aio error Out of files".

**To Reproduce**

I implemented a Python script with the two packets involved, nanomq.pcap and nanomq2.pcap, to reproduce the problem.
[NanoMQ DoS.zip](https://github.com/nanomq/nanomq/files/15176890/NanoMQ.DoS.zip)

```bash
# start the broker
./nanomq start --conf ./nanomq.conf

# execute py script
python3 mqtt_replay.py
```

![image](https://github.com/nanomq/nanomq/assets/44093631/0c1df700-655c-489b-963d-41ba126c2c6a)

Now:
![image](https://github.com/nanomq/nanomq/assets/44093631/88731c21-7aa9-43a0-a465-da751586a5c2)

![image](https://github.com/nanomq/nanomq/assets/44093631/899085e5-7d8f-4174-95fc-16e5607556b2)


**Environment Details**
 - [NanoMQ v0.21.8-8](https://github.com/nanomq/nanomq/releases/download/0.21.8/nanomq-0.21.8-linux-amd64.deb)
 - Ubuntu 20.04
 - I test on the NanoMQ release version

**Client SDK**
If possible include the mqtt sdk you used to connect to nanomq
Minimal C test cases are perferred.

**Additional context**



Potential DoS Attacks in NanoMQ
This is a GitHub Issue
repo:nanomq
owner:emqx
Title : Potential DoS Attacks in NanoMQ
Issue date:

--- start body ---
**Describe the bug**

After the client sends a large number of packets to NanoMQ, NanoMQ will fall into a circular waiting state where the MQTT port is still open, but any new requests will not be responded to.

**Expected behavior**

NanoMQ should revert to the normal receive state after receiving and processing any input message to wait for subsequent requests.

**Actual Behavior**

But, NanoMQ seems to be stuck in a waiting loop, as you can see from the logs it keeps printing "send aio error Out of files".

**To Reproduce**

I implemented a Python script with the two packets involved, nanomq.pcap and nanomq2.pcap, to reproduce the problem.
[NanoMQ DoS.zip](https://github.com/nanomq/nanomq/files/15176890/NanoMQ.DoS.zip)

```bash
# start the broker
./nanomq start --conf ./nanomq.conf

# execute py script
python3 mqtt_replay.py
```

![image](https://github.com/nanomq/nanomq/assets/44093631/0c1df700-655c-489b-963d-41ba126c2c6a)

Now:
![image](https://github.com/nanomq/nanomq/assets/44093631/88731c21-7aa9-43a0-a465-da751586a5c2)

![image](https://github.com/nanomq/nanomq/assets/44093631/899085e5-7d8f-4174-95fc-16e5607556b2)


**Environment Details**
 - [NanoMQ v0.21.8-8](https://github.com/nanomq/nanomq/releases/download/0.21.8/nanomq-0.21.8-linux-amd64.deb)
 - Ubuntu 20.04
 - I test on the NanoMQ release version

**Client SDK**
If possible include the mqtt sdk you used to connect to nanomq
Minimal C test cases are perferred.

**Additional context**



--- end body ---

A potential Denial of Service (DoS) vulnerability in NanoMQ v0.21.8-8 allows an attacker to cause the server to enter a circular waiting state by sending a large number of packets, resulting in the server becoming unresponsive to new requests.