pubsub: simplify ctx.Err check
pubsub: simplify ctx.Err check

Rewrite a check of ctx.Err() in a way that doesn't require a select.

Change-Id: I7e39387a667462e24309683814059a0bad15e60d
Reviewed-on: https://code-review.googlesource.com/c/35073
Reviewed-by: Jean de Klerk <605b93664484fed1e671a07bff68da39e73d0174@google.com>

googleapis/google-cloud-go,googleapis/google-cloud-go,googleapis/google-cloud-go,googleapis/google-cloud-go