if timeout != 0 { errChannel = make(chan error, 2) time.AfterFunc(timeout, func() { errChannel <- errors.New("") }) } Potential fix: The call could be translated to a proctype that executes the translation of the body of the anonymous function