File tree 1 file changed +7
-2
lines changed
addons/ofxOsc/libs/oscpack/src/ip/posix
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -356,7 +356,8 @@ class SocketReceiveMultiplexer::Implementation{
356
356
std::vector< std::pair< PacketListener*, UdpSocket* > > socketListeners_;
357
357
std::vector< AttachedTimerListener > timerListeners_;
358
358
359
- volatile bool break_;
359
+ std::atomic<bool > break_ = false ;
360
+
360
361
int breakPipe_[2 ]; // [0] is the reader descriptor and [1] the writer
361
362
362
363
double GetCurrentTimeMs () const
@@ -423,7 +424,6 @@ class SocketReceiveMultiplexer::Implementation{
423
424
424
425
void Run ()
425
426
{
426
- break_ = false ;
427
427
char *data = 0 ;
428
428
429
429
try {
@@ -540,11 +540,16 @@ class SocketReceiveMultiplexer::Implementation{
540
540
}
541
541
542
542
delete [] data;
543
+ break_ = false ;
544
+
543
545
}catch (...){
544
546
if ( data )
545
547
delete [] data;
548
+ break_ = false ;
549
+
546
550
throw ;
547
551
}
552
+
548
553
}
549
554
550
555
void Break ()
You can’t perform that action at this time.
0 commit comments