@@ -231,7 +231,7 @@ class Communication {
231231
232232 case 'authenticate' :
233233 // user (human) is trying to authenticate
234- this . logComm ( 9 , "Incoming socket auth request from client" ) ;
234+ this . logComm ( 9 , "Incoming socket auth request from client" , data ) ;
235235
236236 // handle case when we are not master, send back retry command
237237 if ( ! this . master ) {
@@ -272,6 +272,34 @@ class Communication {
272272
273273 self . logComm ( 6 , "User socket has authenticated successfully: " + socket . id , { username : user . username } ) ;
274274 socket . send ( 'login' , { version : self . server . __version } ) ;
275+
276+ // update essential client data if this is a reconnect
277+ if ( data . attempt && ( data . attempt > 1 ) ) {
278+ self . logComm ( 6 , `Socket reconnected (${ data . attempt } ), sending full client data update` ) ;
279+ socket . send ( 'update' , {
280+ activeAlerts : self . activeAlerts ,
281+ serverCache : self . serverCache ,
282+
283+ servers : self . servers ,
284+ groups : self . groups ,
285+ monitors : self . monitors ,
286+ alerts : self . alerts ,
287+
288+ categories : self . categories ,
289+ channels : self . channels ,
290+ web_hooks : self . web_hooks ,
291+ buckets : self . buckets ,
292+ secrets : self . secrets , // just metadata, no actual secrets in here
293+ events : self . events ,
294+ plugins : self . plugins ,
295+ tags : self . tags ,
296+ roles : self . roles ,
297+
298+ state : self . state ,
299+ stats : self . stats ,
300+ masters : self . getMasterPeerData ( )
301+ } ) ;
302+ }
275303 } ) ; // loadSession
276304 break ;
277305
0 commit comments