I want the user of my app to be able to reconfigure the osc udp receiver, without terminating the app. On iOS, when the user returns from the Settings app (in which she changed the port), I want to reset the OSC Receiver in willEnterForeground method.
SInce there are no (re)-setter methods in the ReceiverUDP class, I am recreating the entire object with the new port.
mReceiver = std::make_uniqueosc::ReceiverUdp(mPort);
This works sometimes, but most of the times I get
libc++abi.dylib: terminating with uncaught exception of type std::__1::system_error: mutex lock failed: Invalid argument
Anyway to work around that?