chill117/express-mysql-session — pull request #1 by scottbert (2014-03-20 07:16:47+00:00)
Title: Adding in code to deal with disconnects

Hi,

I noticed when using this module that if the MySQL server became disconnected for any reason, the app wouldn't recover and tracked it down to my use of express-mysql-session.

I've modified the code to do the following:
1. Upon disconnect from MySQL the code will immediately attempt to reconnect to the server.
2. If that also fails (if there's network issues or the server is restarting) the code will attempt to reconnect again after 100ms and keep doing this until it reconnects.
3. Optionally accept a new option called reconnectDelay that allows the user to override this 100ms delay with their own value.
4. Linted the code with JSHint.
5. Updated the documentation to explain the new option and to explain you need mocha globally installed to run tests.
All tests still pass. I haven't added any new ones as the only way I can think of to test this is to stop/start MySQL server.