Improve connection handling

1. Previously unhandled connections will stay in pending state. It won't
be closed until timeout happened. This may lead to wasting system
resources. Now the (over-limit) connection is actively rejected.

2. When out-of-memory occurs here, reject the new connection instead of
throwing exception and crash.

3. Also clean up some unused bits.

PR #20961.
This commit is contained in:
Chocobo1
2024-06-20 12:13:27 +08:00
committed by sledgehammer999
parent c2cf898ccd
commit 0f5a27ed50
5 changed files with 32 additions and 34 deletions

View File

@@ -39,7 +39,6 @@
#include <QUrl>
#include <QVBoxLayout>
#include "base/algorithm.h"
#include "base/bittorrent/session.h"
#include "base/bittorrent/torrent.h"
#include "base/bittorrent/trackerentrystatus.h"