@@ -2076,13 +2076,15 @@ private void processStartupRoutingCommand(StartupRoutingCommand startup, long ho
20762076 * and request to reconnect (instead of throwing away).
20772077 */
20782078 private void processPingCommand (Link link , PingCommand cmd , Request request ) {
2079+ request .logD ("Processing:" , true );
20792080 if (cmd .getContextParam ("logid" ) != null ) {
20802081 ThreadContext .put ("logcontextid" , cmd .getContextParam ("logid" ));
20812082 }
2082- PingAnswer answer = new PingAnswer (cmd , getAvoidMsList (), true );
2083+ boolean requestStartupCommand = cmd instanceof PingRoutingCommand && ((PingRoutingCommand ) cmd ).isGatewayAccessible ();
2084+ PingAnswer answer = new PingAnswer (cmd , getAvoidMsList (), requestStartupCommand );
20832085 Response response = new Response (request , new Answer []{answer }, _nodeId , cmd .getHostId ());
20842086 response .setSequence (request .getSequence ());
2085- response .logD ("Processing :" , true );
2087+ response .logD ("Sending :" , true );
20862088 try {
20872089 link .send (response .toBytes ());
20882090 } catch (final ClosedChannelException e ) {
@@ -2321,7 +2323,7 @@ private void processAgentConnectStatusCommand(Link link, AgentConnectStatusComma
23212323
23222324 Response response = new Response (request , new Answer []{answer }, _nodeId , Optional .ofNullable (hostId ).orElse (-1L ));
23232325 response .setSequence (request .getSequence ());
2324- response .logD ("Processing :" , true );
2326+ response .logD ("Sending :" , true );
23252327 try {
23262328 link .send (response .toBytes ());
23272329 } catch (final ClosedChannelException e ) {
0 commit comments