[misc] add patches for gracefully handling missing req.socket/connection GitOrigin-RevId: fd0b067d5a4b5a96857ac94a577460b82bba7672