mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-28 01:00:02 +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();
|
||||
FILE_LOG(logINFO) << "Shut down of UDP port " << *udpPortNumber;
|
||||
fflush(stdout);
|
||||
//delete socket at stoplistening
|
||||
sem_wait(&semaphore_socket);
|
||||
// wait only if the threads have started as it is the threads that
|
||||
//give a post to semaphore(at stopListening)
|
||||
if (runningFlag)
|
||||
sem_wait(&semaphore_socket);
|
||||
delete udpSocket;
|
||||
udpSocket = 0;
|
||||
sem_destroy(&semaphore_socket);
|
||||
|
Loading…
x
Reference in New Issue
Block a user