File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -262,20 +262,20 @@ void DataProcessingDevice::Init()
262262 mState .inputChannelInfos [ci].state = InputChannelState::Pull;
263263 }
264264 }
265+ uv_async_t * wakeHandle = (uv_async_t *)malloc (sizeof (uv_async_t ));
266+ assert (mState .loop );
267+ int res = uv_async_init (mState .loop , wakeHandle, nullptr );
268+ if (res < 0 ) {
269+ LOG (ERROR) << " Unable to initialise subscription" ;
270+ }
271+
265272 // / This should post a message on the queue...
266- SubscribeToNewTransition (" dpl" , [loop = mState .loop ](fair::mq::Transition t) {
267- if (loop) {
268- uv_async_t handle;
269- int res = uv_async_init (loop, &handle, nullptr );
270- if (res < 0 ) {
271- LOG (ERROR) << " Unable to initialise subscription" ;
272- }
273- res = uv_async_send (&handle);
274- if (res < 0 ) {
275- LOG (ERROR) << " Unable to notify subscription" ;
276- }
277- LOG (debug) << " State transition requested" ;
273+ SubscribeToNewTransition (" dpl" , [wakeHandle](fair::mq::Transition t) {
274+ int res = uv_async_send (wakeHandle);
275+ if (res < 0 ) {
276+ LOG (ERROR) << " Unable to notify subscription" ;
278277 }
278+ LOG (debug) << " State transition requested" ;
279279 });
280280}
281281
You can’t perform that action at this time.
0 commit comments