ObservableTunnel: Don't recurse in getConfig
The correct way to retrieve the value inside a getter/setter is to use `field` to ensure you don't invoke the getter while inside the getter and trigger a stack overflow Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
e905c355f9
commit
9fe008d407
@ -65,9 +65,9 @@ class ObservableTunnel internal constructor(
|
|||||||
@get:Bindable
|
@get:Bindable
|
||||||
var config = config
|
var config = config
|
||||||
get() {
|
get() {
|
||||||
if (config == null)
|
if (field == null)
|
||||||
manager.getTunnelConfig(this).whenComplete(ExceptionLoggers.E)
|
manager.getTunnelConfig(this).whenComplete(ExceptionLoggers.E)
|
||||||
return config
|
return field
|
||||||
}
|
}
|
||||||
private set
|
private set
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user