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 09:04:19 UTC

[GitHub] [pulsar-client-go] leizhiyuan opened a new pull request #590: [issue 589]fix incorrect close,should close cnx, not connection

leizhiyuan opened a new pull request #590:
URL: https://github.com/apache/pulsar-client-go/pull/590


   Fixes #589
   
   ### Motivation
   
   
   The Close method will not be executed twice. It seems we need close the cnx ,not connection
   
   ### Modifications
   
   close the cnx
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   *(Please pick either of the following options)*
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   *(or)*
   
   This change is already covered by existing tests, such as *(please describe tests)*.
   
   *(or)*
   
   This change added tests and can be verified as follows:
   
   *(example:)*
     - *Added integration tests for end-to-end deployment with large payloads (10MB)*
     - *Extended integration test for recovery after broker failure*
   
   ### Does this pull request potentially affect one of the following parts:
   
   *If `yes` was chosen, please highlight the changes*
   
     - Dependencies (does it add or upgrade a dependency): (yes / no)
     - The public API: (yes / no)
     - The schema: (yes / no / don't know)
     - The default values of configurations: (yes / no)
     - The wire protocol: (yes / no)
   
   ### Documentation
   
     - Does this pull request introduce a new feature? (yes / no)
     - If yes, how is the feature documented? (not applicable / docs / GoDocs / not documented)
     - If a feature is not applicable for documentation, explain why?
     - If a feature is not documented yet in this PR, please create a followup issue for adding the documentation
   


-- 
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



[GitHub] [pulsar-client-go] cckellogg commented on a change in pull request #590: [issue 589]fix incorrect close,should close cnx, not connection

Posted by GitBox <gi...@apache.org>.
cckellogg commented on a change in pull request #590:
URL: https://github.com/apache/pulsar-client-go/pull/590#discussion_r686134560



##########
File path: pulsar/internal/connection.go
##########
@@ -428,7 +428,7 @@ func (c *connection) runPingCheck(pingCheckTicker *time.Ticker) {
 				// We have not received a response to the previous Ping request, the
 				// connection to broker is stale
 				c.log.Warn("Detected stale connection to broker")
-				c.Close()
+				c.cnx.Close()

Review comment:
       Why is this needed? The c.Close() closes underlying connection already. Same for the others below.




-- 
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



[GitHub] [pulsar-client-go] leizhiyuan closed pull request #590: [issue 589]fix incorrect close,should close cnx, not connection

Posted by GitBox <gi...@apache.org>.
leizhiyuan closed pull request #590:
URL: https://github.com/apache/pulsar-client-go/pull/590


   


-- 
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