View | Details | Raw Unified | Return to bug 50168
Collapse All | Expand All

(-)java/org/apache/catalina/connector/MapperListener.java (-1 / +1 lines)
Lines 415-421 Link Here
415
            } else if (obj instanceof Host) {
415
            } else if (obj instanceof Host) {
416
                registerHost((Host) obj);
416
                registerHost((Host) obj);
417
            }
417
            }
418
        } else if (event.getType() == Lifecycle.BEFORE_STOP_EVENT) {
418
        } else if (event.getType() == Lifecycle.AFTER_STOP_EVENT) {
419
            Object obj = event.getSource();
419
            Object obj = event.getSource();
420
            if (obj instanceof Wrapper) {
420
            if (obj instanceof Wrapper) {
421
                unregisterWrapper((Wrapper) obj);
421
                unregisterWrapper((Wrapper) obj);
(-)java/org/apache/catalina/core/ContainerBase.java (-6 / +13 lines)
Lines 940-950 Link Here
940
            return;
940
            return;
941
        }
941
        }
942
        
942
        
943
        synchronized(children) {
943
        removeChildInternal(child);
944
            if (children.get(child.getName()) == null)
945
                return;
946
            children.remove(child.getName());
947
        }
948
        
944
        
949
        try {
945
        try {
950
            if (child.getState().isAvailable()) {
946
            if (child.getState().isAvailable()) {
Lines 966-971 Link Here
966
962
967
    }
963
    }
968
964
965
    protected void removeChildInternal(Container child) {
966
        synchronized(children) {
967
            if (children.get(child.getName()) == null)
968
                return;
969
            children.remove(child.getName());
970
        }
971
    }
969
972
970
    /**
973
    /**
971
     * Remove a container event listener from this component.
974
     * Remove a container event listener from this component.
Lines 1102-1108 Link Here
1102
1105
1103
        // Required if the child is destroyed directly.
1106
        // Required if the child is destroyed directly.
1104
        if (parent != null) {
1107
        if (parent != null) {
1105
            parent.removeChild(this);
1108
            if (parent instanceof ContainerBase) {
1109
                ((ContainerBase) parent).removeChildInternal(this);
1110
            } else {
1111
                parent.removeChild(this);
1112
            }
1106
        }
1113
        }
1107
1114
1108
        super.destroyInternal();
1115
        super.destroyInternal();

Return to bug 50168