Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving startup error message when binding on tcp port fails #592

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/keri/app/indirecting.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,17 @@ def setupWitness(hby, alias="witness", mbx=None, aids=None, tcpPort=5631, httpPo
app.add_route("/receipts", receiptEnd)

server = createHttpServer(httpPort, app, keypath, certpath, cafilepath)
if not server.reopen():
raise RuntimeError(f"cannot create http server on port {httpPort}")
httpServerDoer = http.ServerDoer(server=server)

# setup doers
regDoer = basing.BaserDoer(baser=verfer.reger)

if tcpPort is not None:
server = serving.Server(host="", port=tcpPort)
if not server.reopen():
raise RuntimeError(f"cannot create tcp server on port {tcpPort}")
serverDoer = serving.ServerDoer(server=server)

directant = directing.Directant(hab=hab, server=server, verifier=verfer)
Expand Down
Loading