Google Cloud Pubsub消息iterator.Next()超时,而不是返回iterator.Done(Go客户端)

I'm trying to pull messages from a Pubsub subscription on an App Engine app. (The GAE app currently uses Go client library for GCP.) And after consuming all the queued messages, I am constantly hitting the following RPC error.

rpc error: code = 13 desc = transport is closing

According to the doc, I'm supposed to get iterator. Done as an error from the Next() call after the last message in the queue, but it always returns the above RPC error.

Is it an intended behavior?