You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by rx...@apache.org on 2020/07/14 02:18:58 UTC
[pulsar-client-go] branch master updated: [Issue 306] Change
connection failed warn log to error and print error message (#309)
This is an automated email from the ASF dual-hosted git repository.
rxl 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 5fea0e8 [Issue 306] Change connection failed warn log to error and print error message (#309)
5fea0e8 is described below
commit 5fea0e897a387e23766edce863f45e7a6661549c
Author: Lan <li...@163.com>
AuthorDate: Tue Jul 14 10:18:48 2020 +0800
[Issue 306] Change connection failed warn log to error and print error message (#309)
### Motivation
Explain here the context, and why you're making that change. What is the problem you're trying to solve.
### Modifications
Print a clean log when the connection failed.
---
pulsar/internal/connection.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pulsar/internal/connection.go b/pulsar/internal/connection.go
index cc770bb..703c773 100644
--- a/pulsar/internal/connection.go
+++ b/pulsar/internal/connection.go
@@ -315,8 +315,8 @@ func (c *connection) doHandshake() bool {
c.cnx.SetDeadline(time.Time{})
if cmd.Connected == nil {
- c.log.Warnf("Failed to perform initial handshake - Expecting 'Connected' cmd, got '%s'",
- cmd.Type)
+ c.log.Warnf("Failed to establish connection with broker: '%s'",
+ cmd.Error.GetMessage())
return false
}
if cmd.Connected.MaxMessageSize != nil {