fix 100% CPU usage on BSD system

Should use sock instead of its file descriptor.
See more at https://github.com/kennethreitz/requests/issues/1910.