Select() error code is no longer lost because of recv().
(cherry picked from commit 56afde78024563bc1daf6e3a5f8f44b65f3b04e5)