agroal / pgagroal

High-performance connection pool for PostgreSQL
https://agroal.github.io/pgagroal/
BSD 3-Clause "New" or "Revised" License
667 stars 59 forks source link

[#426] Fix a problem in `pgagroal_bind` #437

Closed fluca1978 closed 3 months ago

fluca1978 commented 3 months ago

If the configuration host is set to *, meaning all the interfaces, the pgagroal_bind function was always returning a true value even if no available bind addresses were left. In order to fix this, the commit tests if the star_length variable has been set to something non-zero, otherwise no more sockets are available (bound) and the function returns a 1 to indicate an error.

Close #426

jesperpedersen commented 3 months ago

Rebased and merged.

Thanks for your contribution !