mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-28 09:10:01 +02:00
bug fix for starting and stopping receiver, without listening
This commit is contained in:
parent
228cfa35c0
commit
05d8ef6277
@ -227,8 +227,10 @@ void Listener::ShutDownUDPSocket() {
|
|||||||
udpSocket->ShutDownSocket();
|
udpSocket->ShutDownSocket();
|
||||||
FILE_LOG(logINFO) << "Shut down of UDP port " << *udpPortNumber;
|
FILE_LOG(logINFO) << "Shut down of UDP port " << *udpPortNumber;
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
//delete socket at stoplistening
|
// wait only if the threads have started as it is the threads that
|
||||||
sem_wait(&semaphore_socket);
|
//give a post to semaphore(at stopListening)
|
||||||
|
if (runningFlag)
|
||||||
|
sem_wait(&semaphore_socket);
|
||||||
delete udpSocket;
|
delete udpSocket;
|
||||||
udpSocket = 0;
|
udpSocket = 0;
|
||||||
sem_destroy(&semaphore_socket);
|
sem_destroy(&semaphore_socket);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user