czmq
                                
                                 czmq copied to clipboard
                                
                                    czmq copied to clipboard
                            
                            
                            
                        zloop allows calling start() again but timer removal fails then
The terminated member in _zloop_t is only used in zloop_timer_end to check whether the timer can be removed immediately or via the zombie list.
The terminated member is initialized to false in zloop_new through zmalloc. It is set to true before returning from zloop_start.
Now, if you call zloop_start again on the same zloop_t object, terminated is still true, and then if you call zloop_timer_end from a reactor callback, you end up touching self->timers against the warning on line 581 in zloop.c.
Judging by the test suite, calling zloop_start repeatedly is a valid use case.
The fix seems simple enough; self->terminated = false; before the main reactor loop in zloop_start.
can you send a PR?
My colleague found the time to spearhead making the PR: https://github.com/zeromq/czmq/pull/2282