Skip to content

refactor: Simplify App.initServerSocket#4951

Closed
mkleczek wants to merge 2 commits into
PostgREST:mainfrom
mkleczek:push-zsnvtukwwqmy
Closed

refactor: Simplify App.initServerSocket#4951
mkleczek wants to merge 2 commits into
PostgREST:mainfrom
mkleczek:push-zsnvtukwwqmy

Conversation

@mkleczek
Copy link
Copy Markdown
Collaborator

@mkleczek mkleczek commented May 24, 2026

This change gets rid of unnecessary explicit bindRandomPortTCP in initServerSocket. Returned port value was ignored in removed code anyway as assigned port retrieval from an open socket is handled elsewhere.

Extracted from #4880 and stacked on top of it.

mkleczek added 2 commits May 24, 2026 20:08
This change ensures PostgREST starts listening on a server socket only after it loaded the schema cache and is ready to handle requests. It is no longer going to return 503 errors during startup until the schema cache is loaded.
This change gets rid of unnecessary explicit bindRandomPortTCP in initServerSocket. Returned port value was ignored in removed code anyway as assigned port retrieval from an open socket is handled elsewhere.
@wolfgangwalther
Copy link
Copy Markdown
Member

Extracted from #4880 and stacked on top of it.

I think the refactor should come first and then #4880 should come on top. Cherry-picked the commit in 1a6ba20 instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants