check valid fd before call receive