sosedoff / pgweb

Cross-platform client for PostgreSQL databases
https://sosedoff.github.io/pgweb
MIT License
8.55k stars 723 forks source link

Configure timeout and retries when testing connection status #623

Closed sosedoff closed 1 year ago

sosedoff commented 1 year ago

Fixes the confusing behavior when previously established connection is broken, prompting user with connection screen on page load. However, when page is simply reloaded, the UI works as expected. This has to do with database driver automatically reestablishing connection in the mean time, after the first failed attempt to get connection details.

Changes will allow us to automatically reconnect within 5 seconds when checking on connection status via /api/connection endpoint.

Supersedes #533