File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -34,9 +34,11 @@ func encodeConnectionAttributes(cfg *Config) string {
34
34
connAttrsBuf = appendLengthEncodedString (connAttrsBuf , connAttrPlatformValue )
35
35
connAttrsBuf = appendLengthEncodedString (connAttrsBuf , connAttrPid )
36
36
connAttrsBuf = appendLengthEncodedString (connAttrsBuf , strconv .Itoa (os .Getpid ()))
37
- connAttrsBuf = appendLengthEncodedString (connAttrsBuf , connAttrServerHost )
38
37
serverHost , _ , _ := net .SplitHostPort (cfg .Addr )
39
- connAttrsBuf = appendLengthEncodedString (connAttrsBuf , serverHost )
38
+ if serverHost != "" {
39
+ connAttrsBuf = appendLengthEncodedString (connAttrsBuf , connAttrServerHost )
40
+ connAttrsBuf = appendLengthEncodedString (connAttrsBuf , serverHost )
41
+ }
40
42
41
43
// user-defined connection attributes
42
44
for _ , connAttr := range strings .Split (cfg .ConnectionAttributes , "," ) {
You can’t perform that action at this time.
0 commit comments