Commit 9ee60e7a erroneously introduced duplicate conditions to several existing conditional statements responsible for determining error codes passed to connection callbacks upon failure. Fix the affected expressions to ensure connection callbacks are invoked with:
the ISC_R_SHUTTINGDOWN error code when a global netmgr shutdown is in progress,
the ISC_R_CANCELED error code when a specific operation has been canceled.
This does not fix any known bugs, it only adjusts the changes introduced by commit 9ee60e7a so that they match its original intent.