Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The incoming-connection-request endpoint that got rejected by the application did not yet have a thread to process its events. As a result, when the remote peer disconnected after receiving REJECTED message, the passive side would not get EPOLLHUP event (which will drop corresponding references and clean up endpoint resources) because the endpoint was not in any thread's epoll. The rejected endpoint was left dangling, leaking endpoint resources including socket file descriptor. This patch fixes the issue by dropping the corresponding endpoint references to clean up rejected endpoint resources. The rejected endpoint does not need to get a zap thread assigned to handle this. NOTE: This bug is introduced by Rail implementation. The RAIL implementation modified `zap_sock` to use the thread of the listening endpoint to process connection request instead of assigning it a new thread right away. The behavior BEFORE Rail was to assign a thread to the incoming endpoint right away. This bug does not affect OVIS-4.4.x.
- Loading branch information