refactor long poller, ensure long polling takes into account the duration it already waited
use our source
handle broken sockets correctly