return an error if we enounter errors, otherwise we will not exit the 
poll loop.
Merge remote-tracking branch 'svn/trunk'