kgiusti commented on a change in pull request #803:
URL: https://github.com/apache/qpid-dispatch/pull/803#discussion_r463641913



##########
File path: src/router_core/connections.c
##########
@@ -1381,6 +1381,10 @@ static void qdr_connection_opened_CT(qdr_core_t *core, 
qdr_action_t *action, boo
         qdrc_event_conn_raise(core, QDRC_EVENT_CONN_OPENED, conn);
     }
 
+    if (discard && conn) {

Review comment:
       Code nit - why stuff this way down on the tail?   Why not do an 
immediate check for discard at the start of the function?  That would be 
consistent with how the discard flag is handled w.r.t. other action routines:
   if (discard) {
      if (conn) qd_connection_free(conn);
      return;
   }
   
   Added bonus - drops a whole level of indentation.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to