File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 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 {
3434 connAttrsBuf = appendLengthEncodedString (connAttrsBuf , connAttrPlatformValue )
3535 connAttrsBuf = appendLengthEncodedString (connAttrsBuf , connAttrPid )
3636 connAttrsBuf = appendLengthEncodedString (connAttrsBuf , strconv .Itoa (os .Getpid ()))
37- connAttrsBuf = appendLengthEncodedString (connAttrsBuf , connAttrServerHost )
3837 serverHost , _ , _ := net .SplitHostPort (cfg .Addr )
39- connAttrsBuf = appendLengthEncodedString (connAttrsBuf , serverHost )
38+ if serverHost != "" {
39+ connAttrsBuf = appendLengthEncodedString (connAttrsBuf , connAttrServerHost )
40+ connAttrsBuf = appendLengthEncodedString (connAttrsBuf , serverHost )
41+ }
4042
4143 // user-defined connection attributes
4244 for _ , connAttr := range strings .Split (cfg .ConnectionAttributes , "," ) {
You can’t perform that action at this time.
0 commit comments