Remove superfluous check for POLLIN in TCPStore (#25911)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/25911
The check is practically equivalent to checking for equivalence with
POLLIN (because the constant is a single bit and poll(2) is asked to
check for POLLIN). On macOS, if a client disconnects, POLLHUP will be
set as well, and the check fails. Instead of performing the check and
letting it fail, we can simply run the `query` function and catch
exceptions, in case we see EOF.
Test Plan: Imported from OSS
Differential Revision: D17313301
Pulled By: pietern
fbshipit-source-id: 00c5a69043f70848ef632d53f8e046dc69e15650