Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[SyncAgent] clean listen after single request
Regression introduced by 83a7c4f

Detected by SyncAgentTest::testSync(), SyncAgentTest.cpp:147

Relates NEMO#664
  • Loading branch information
martyone committed May 22, 2013
1 parent a04f5e3 commit 493bea8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/SyncAgent.cpp
Expand Up @@ -488,6 +488,7 @@ void SyncAgent::listenEvent()
RequestListener::RequestData data = iListener->takeRequestData();

iListener->stop();
cleanListenLater();

if( data.iType == RequestListener::REQUEST_CLIENT )
{
Expand Down Expand Up @@ -621,3 +622,11 @@ void SyncAgent::cleanListen()
delete iListener;
iListener = NULL;
}

void SyncAgent::cleanListenLater()
{
FUNCTION_CALL_TRACE

iListener->deleteLater();
iListener = NULL;
}
1 change: 1 addition & 0 deletions src/SyncAgent.h
Expand Up @@ -745,6 +745,7 @@ private slots:

void abortListen();
void cleanListen();
void cleanListenLater();

RequestListener* iListener;
SessionHandler* iHandler;
Expand Down

0 comments on commit 493bea8

Please sign in to comment.