void deliver(Packet packet) {
            if (connection != null && !connection.isClosed()) {
                try {
                    connection.deliver(packet);
                }
                catch (Exception e) {
                    Log.error(LocaleUtils.getLocalizedString("admin.error"), e);
                    connection.close(new StreamError(StreamError.Condition.internal_server_error));
                }
            }
        }
Delivers the packet to the external component.

@param packet the packet to deliver.
xmppserver/src/main/java/org/jivesoftware/openfire/session/LocalComponentSession.java