fix incorrect sockfd when setting TCP_NODELAY