fix race in socket code

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

Merge request reports