This is an automated email from the ASF dual-hosted git repository.

zike pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-client-go.git


The following commit(s) were added to refs/heads/master by this push:
     new f979c183 [fix] Fix comment for ConnectionMaxIdleTime (#1091)
f979c183 is described below

commit f979c183c55b6efdceaa1cebcb62f1c20f8ef604
Author: Masahiro Sakamoto <[email protected]>
AuthorDate: Wed Sep 13 20:58:42 2023 +0900

    [fix] Fix comment for ConnectionMaxIdleTime (#1091)
    
    ### Motivation
    
    The default value of `ConnectionMaxIdleTime` is said to be 60 seconds in 
the comment,
    
https://github.com/apache/pulsar-client-go/blob/2a15a251d25bd2a6276051d71873e9e106cc1e85/pulsar/client.go#L155-L157
    
    but it actually seems to be 180 seconds. 60 seconds is the minimum value, 
not the default value.
    
https://github.com/apache/pulsar-client-go/blob/2a15a251d25bd2a6276051d71873e9e106cc1e85/pulsar/client_impl.go#L39-L40
---
 pulsar/client.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pulsar/client.go b/pulsar/client.go
index d6f18c9a..d9ac2a73 100644
--- a/pulsar/client.go
+++ b/pulsar/client.go
@@ -153,7 +153,7 @@ type ClientOptions struct {
        MetricsRegisterer prometheus.Registerer
 
        // Release the connection if it is not used for more than 
ConnectionMaxIdleTime.
-       // Default is 60 seconds, negative such as -1 to disable.
+       // Default is 180 seconds, minimum is 60 seconds. Negative such as -1 
to disable.
        ConnectionMaxIdleTime time.Duration
 
        EnableTransaction bool

Reply via email to