facebook / facebook/hhvm

Persistent sockets aren't very persistent

Open
#6,542 2 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.