Suspicious socket

These two commits address some suspicious looking issues in commoncpp/socket.