Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
http: Change free sockets behavior to LIFO from FIFO.
Sockets are added to the free list with .push() but they were being removed with .shift(). This meant the sockets where being removed in FIFO order, but this changes it to LIFO. Since older sockets may be closed based due to inactivity on the server it is more likely that a socket that is recently used will be able to successfully process the next request. Rather than destroying the last used socket destroy the oldest socket in the free list in push() on the last recently used socket.
- Loading branch information