cckellogg commented on a change in pull request #83: Handle RPC errors in
reconnections
URL: https://github.com/apache/pulsar-client-go/pull/83#discussion_r341835937
##########
File path: pulsar/internal/connection.go
##########
@@ -424,7 +422,24 @@ func (c *connection) handleResponse(requestID uint64,
response *pb.BaseCommand)
delete(c.pendingReqs, requestID)
c.mapMutex.RUnlock()
- request.callback(response)
+ request.callback(response, nil)
+}
+
+func (c *connection) handleResponseError(serverError *pb.CommandError) {
+ requestID := serverError.GetRequestId()
+ c.mapMutex.RLock()
+ request, ok := c.pendingReqs[requestID]
+ if !ok {
+ c.log.Warnf("Received unexpected error response for request %d
of type %s",
+ requestID, serverError.GetError())
+ return
Review comment:
Do we need to unlock the mapMutex before returning here?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services