Persistent sockets aren't very persistent
Open
feature request
low-pri
no isolated repro
- Dominant language
- C++
- Stars
- 18.7k
- Forks
- 3.1k
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 2
Description
Persistent sockets will work when reused in the same page request. However after a page request completes, it appears the persisted socket is closed, and thus a new page request on the same thread will be unable to use the persisted socket and a new connection will be created.
It appears this is sweep's fault. I think File and Socket's implementation of sweep is doing too much. They'll call closeImpl on the data object which will close the file/socket, but that will also happen in the data object's destructor, so I think we can remove that extra call to closeImpl and just rely on that happening when the data object's refcount hits zero.
Contributor guide
Assessment
This issue has not been assessed yet.