fix race in socket code

Evan Hunt requested to merge 834-fix-race-in-fctx-cancel-v9_14 into v9_14

Merge request reports