fix: Max connection limit not applied

This commit is contained in:
yuanyuanxiang
2024-12-31 03:11:26 +08:00
parent 943c269700
commit 9561a5d09d
5 changed files with 19 additions and 1 deletions

View File

@@ -19,7 +19,7 @@ public:
return buf;
}
~Buffer() {
(*ref)--;
DelRef();
if (*ref == 0) {
if (buf!=NULL)
{
@@ -48,6 +48,7 @@ public:
buf = o.buf;
len = o.len;
ref = o.ref;
return *this;
}
char* c_str() const {
return (char*)buf;