File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -64,25 +64,23 @@ func (s *FluentSession) doPingPong() error {
64
64
pingKey := hex .EncodeToString (shared_key_hexdigest .Sum (nil ))
65
65
66
66
hr := sha512 .New ()
67
- ping ["server_hostname" ] = s .Hostname
68
-
69
- for _ , k := range []string {"shared_key_salt" , "server_hostname" , "nonce" } {
70
- hr .Write ([]byte (ping [k ]))
71
- }
67
+ hr .Write ([]byte (ping ["shared_key_salt" ]))
68
+ hr .Write ([]byte (s .Hostname ))
69
+ hr .Write ([]byte (s .nonce ))
72
70
hr .Write ([]byte (s .SharedKey ))
73
71
74
72
fmt .Println ("PONG" )
75
73
if ping ["shared_key_hexdigest" ] != pingKey {
76
74
_list (s .encoder , "PONG" ,
77
75
false , "shared key mismatch" ,
78
- ping [ "server_hostname" ] ,
76
+ s . Hostname ,
79
77
hex .EncodeToString (hr .Sum (nil )),
80
78
)
81
79
return fmt .Errorf ("shared key mismatch %v != %v" , ping ["shared_key_hexdigest" ], pingKey )
82
80
}
83
81
_list (s .encoder , "PONG" ,
84
82
true , "" ,
85
- ping [ "server_hostname" ] ,
83
+ s . Hostname ,
86
84
hex .EncodeToString (hr .Sum (nil )),
87
85
)
88
86
You can’t perform that action at this time.
0 commit comments