schleife close() -> onclose() -> close() -> ... verhindern.