Fix the poll socket engine.
Merge pull request #537 from SaberUK/master+fix-poll

Fix the poll socket engine.