Fixed OutOfMemory error if initializing fails (#10924)

Signed-off-by: Gerhard Riegler <gerhard.riegler@gmail.com>
This commit is contained in:
Gerhard Riegler
2021-07-15 19:48:01 +02:00
committed by GitHub
parent b043d8f4bc
commit 69bc7183d6

View File

@@ -133,6 +133,7 @@ public class GardenaSmartImpl implements GardenaSmart, GardenaSmartWebSocketList
startWebsockets(); startWebsockets();
initialized = true; initialized = true;
} catch (Exception ex) { } catch (Exception ex) {
dispose();
throw new GardenaException(ex.getMessage(), ex); throw new GardenaException(ex.getMessage(), ex);
} }
} }