fix: incorrect impl of socket polling