Made QueryBuilder attempt to use the socket setting if present.
Made QueryBuilder close the socket on a multi-socket connection attempt.