JLuboff / connect-mssql-v2

MS SQL Server session store for Express Session
MIT License
5 stars 7 forks source link

Throws initial ConnectionError --- Connects but does not persist #9

Closed JLuboff closed 4 years ago

JLuboff commented 4 years ago

When using in an actual project, initially get a Connection is closed error, but looking at my own logs, can see it is connected, however, the connection is not staying persistent. Or connection is persistent but the on("connect") emitter is firing when it shouldn't (should only emit on initial connection).

JLuboff commented 4 years ago

Fixed: 5d0eae0

Instantiate database pool within the constructor, only initialize connection if state is not connected or connecting.