Patch to check success of the socket creation

While unlikely, the socket creation could fail,
returning an error rather than a file descriptor.
Log it, and continue.

Fixes coverity 746816