Skip to content
  • Lucas Russo's avatar
    dev_io/dev_io_core.c: fix unnecessary $TERM message to actor · 71e05dbd
    Lucas Russo authored
    On DEVIO destruction, typically triggered by the
    SIGINT, the main DEVIO thread receives it and
    used to start sending $TERM messages to all SMIOs
    (implemented as actors/threads).
    
    However, the SMIOs also receive the signal and exited
    gracefully, as usual. The problem arises by the fact
    that some SMIOs exited before the DEVIO had a chance
    to send the message to that specific SMIO. This would
    block the zmsg_send (), as it waits forever to send
    the message by default, which will never get to the
    SMIO, as it does not exists anymore.
    
    The solution would be to have a timeout for the
    zmsg_send () and consider the SMIO as nonexisting
    if it cannot send the message some time after.
    
    Instead of doing this, we simply omit the message send
    and call zactor_destroy () directly, as it already
    implements this timeout.
    71e05dbd