You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/08/10 22:21:42 UTC

[GitHub] [pulsar-client-go] leizhiyuan commented on a change in pull request #588: [issue 587] fail all pending requests when occurs ServerError_TopicTerminated…

leizhiyuan commented on a change in pull request #588:
URL: https://github.com/apache/pulsar-client-go/pull/588#discussion_r686359874



##########
File path: pulsar/internal/connection.go
##########
@@ -697,6 +692,29 @@ func (c *connection) deletePendingRequest(requestID uint64) (*request, bool) {
 	return request, ok
 }
 
+func (c *connection) failPendingRequests(err error) bool {
+	c.pendingLock.Lock()
+	defer c.pendingLock.Unlock()
+	for id, req := range c.pendingReqs {
+		req.callback(nil, err)
+		delete(c.pendingReqs, id)
+	}
+	return true
+}
+
+func (c *connection) failPendingRequest(requestID uint64, err error) bool {

Review comment:
       ok




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org