Description
When a client connects to the broker the connection gets added inside the processAddConnection method in TransportConnection. Right now if there is an exception the socket is only shutdown if the type of exception is SecurityException. However the connection should really be closed if any error occurs when trying to add the connection.
For example if an InvalidClientIDException occurs then the connection is no longer tracked by the broker but the socket stays open until the client actually closes it on their end. This should be fixed so that the error terminates the socket connection since the connection attempt failed.