Skip to content
This repository has been archived by the owner on Jul 1, 2023. It is now read-only.

init listener impl boilerplate with runInLoop #295

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Feb 10, 2021

  1. init listener impl boilerplate with runInLoop

    This fixes a bug in core/listener_impl.cc where:
    context->listen(address) does a deferred init of the listener, but listener->addr()) 2 lines down does a runInLoop addr() on the same listener. When this is run from within the loop itself, init will be deferred but addr will be called immediately. addr will then throw an exception since listener has not been initialized.
    This fix simply makes init use runInLoop too, which makes it initialize immediately when run from within the loop.
    Note that the code usually works since new listeners are usually not created from within the loop, but I don't see why this should not be allowed
    tscmoo committed Feb 10, 2021
    Configuration menu
    Copy the full SHA
    6239e67 View commit details
    Browse the repository at this point in the history