Fix issue #25 - Exit proxy loop when poll returns -1