yandex / odyssey

Scalable PostgreSQL connection pooler
BSD 3-Clause "New" or "Revised" License
3.21k stars 165 forks source link

Avoid machinarium call with router lock #606

Closed x4m closed 7 months ago

x4m commented 7 months ago

Similar to #599

reshke commented 7 months ago

    saddr = (struct sockaddr *)&sa;
-   if (client->type == OD_POOL_CLIENT_EXTERNAL)
-   {
+   if (client->type == OD_POOL_CLIENT_EXTERNAL) {
        rc = machine_getpeername(client->io.io, saddr, &salen);
        if (rc == -1) {
            return OD_ROUTER_ERROR;