malloy icon indicating copy to clipboard operation
malloy copied to clipboard

server::listener: provide method for catching binding errors

Open Tectu opened this issue 3 years ago • 0 comments

As of today, malloy::server::listener binds starts to listen in the constructor. If the acceptor could not start listening (for example because the end-point is already in use), there is no way for a consumer to catch this programmatically.

Possible solutions:

  • Throw in the constructor (meh)
  • Move relevant pieces of code from constructor to run() and return boolean.

Tectu avatar Aug 17 '22 16:08 Tectu