Skip to content

Commit

Permalink
feat: server should not start if an application raised on bind/bound
Browse files Browse the repository at this point in the history
  • Loading branch information
hartym committed Feb 23, 2024
1 parent 87d0ea9 commit e9ae4a4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions harp/config/factories/kernel_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ async def build(self):
)
except Exception as exc:
logger.fatal("Fatal while dispatching «factory bind» event: %s", exc)
raise

# this can fail if configuration is not valid, but we let the container raise exception which is more explicit
# that what we can show here.
Expand All @@ -82,6 +83,7 @@ async def build(self):
)
except Exception as exc:
logger.fatal("Fatal while dispatching «factory bound» event: %s", exc)
raise

kernel = self.KernelType(dispatcher=dispatcher, resolver=resolver)
binds = [Bind(host=self.hostname, port=port) for port in resolver.ports]
Expand Down

0 comments on commit e9ae4a4

Please sign in to comment.