Fixes issue #8
Currently, a new database connection is created each time someone calls session() which results in a DNS and database connection flood and adds unnecessary delays without any reason.
The fix tried to reuse a once-created connection until it got lost (maybe due to a server-side timeout for idle connections) and reconnects on demand.
Fixes issue #8 Currently, a new database connection is created each time someone calls
session()
which results in a DNS and database connection flood and adds unnecessary delays without any reason.The fix tried to reuse a once-created connection until it got lost (maybe due to a server-side timeout for idle connections) and reconnects on demand.