From c5e91552e130091c06e7e6831103b8889b0d6505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 15 Aug 2008 14:47:11 +0000 Subject: [PATCH] * Now uses the new wait_for_timer() stack function on destruction - this fixes bug #2143. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26981 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../kernel/network/protocols/tcp/TCPEndpoint.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/add-ons/kernel/network/protocols/tcp/TCPEndpoint.cpp b/src/add-ons/kernel/network/protocols/tcp/TCPEndpoint.cpp index 13b7b52cf1..a9a3a8a483 100644 --- a/src/add-ons/kernel/network/protocols/tcp/TCPEndpoint.cpp +++ b/src/add-ons/kernel/network/protocols/tcp/TCPEndpoint.cpp @@ -406,7 +406,8 @@ TCPEndpoint::TCPEndpoint(net_socket* socket) this); gStackModule->init_timer(&fDelayedAcknowledgeTimer, TCPEndpoint::_DelayedAcknowledgeTimer, this); - gStackModule->init_timer(&fTimeWaitTimer, TCPEndpoint::_TimeWaitTimer, this); + gStackModule->init_timer(&fTimeWaitTimer, TCPEndpoint::_TimeWaitTimer, + this); } @@ -424,8 +425,11 @@ TCPEndpoint::~TCPEndpoint() mutex_destroy(&fLock); - // TODO: we need to wait for all timers to return - //_WaitForTimers(); + // we need to wait for all timers to return + gStackModule->wait_for_timer(&fRetransmitTimer); + gStackModule->wait_for_timer(&fPersistTimer); + gStackModule->wait_for_timer(&fDelayedAcknowledgeTimer); + gStackModule->wait_for_timer(&fTimeWaitTimer); }