FIX ISSUE #4

wait a bit in the the select loop for not consuming 100% CPU
fix bad condition in prv_find_object()
Merge pull request #5 from jvermillard/master

FIX ISSUE #4
Merge pull request #6 from kartben/issue-3

fix bad condition in prv_find_object()