Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/SoftEtherVPN/SoftEtherVPN_Stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/Cedar/Listener.c')
-rw-r--r--src/Cedar/Listener.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Cedar/Listener.c b/src/Cedar/Listener.c
index 5da5ade6..f57dcf2a 100644
--- a/src/Cedar/Listener.c
+++ b/src/Cedar/Listener.c
@@ -247,6 +247,9 @@ void TCPAcceptedThread(THREAD *t, void *param)
// Create a connection
c = NewServerConnection(r->Cedar, s, t);
+ AddRef(r->ref);
+ c->Listener = r;
+
// Register to Cedar as a transient connection
AddConnection(c->Cedar, c);
@@ -264,8 +267,11 @@ void TCPAcceptedThread(THREAD *t, void *param)
ConnectionAccept(c);
flag1 = c->flag1;
+
// Release
SLog(r->Cedar, "LS_CONNECTION_END_1", c->Name);
+ ReleaseListener(c->Listener);
+ c->Listener = NULL;
ReleaseConnection(c);
// Release