good catch, but this needs to move to line 332 (in the if block) so that it is assigned in the goroutine that reads that value for the deadline