Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added check for res.headersSent before attempting to send a response …
…due to the session middleware triggering its callback with an error. Even though this is usually indicative of a timing issue in app-level code (where it attempts to respond more than once, simultaneous with a session store issue-- e.g. a hiccup in the redis connection), the process still should not crash, if possible. Since recovery is possible here, and _some_ sort of response has obviously been sent, it's preferable to keep the process alive in this scenario.
- Loading branch information