Closed simaxme closed 2 years ago
The Core gets destroyed as soon as you leave the try-with-resources
block:
try(Core core = new Core(params)) {
this.core = core;
this.createPresence();
this.onTenSeconds();
}
Just change it to
this.core = new Core(params);
this.createPresence();
this.onTenSeconds();
and it should work.
You only want to use a try-with-resources
statement if you don't need the resource later anymore.
EDIT: You also should store the CreateParams
somewhere (e.g. as a field of your class) and also not use a try-with-resources
for them either, they need to be alive as long as the core is alive.
Hey, So I am wanna make a simple disord presence application, but when i try to start my application, i get this weird message saying
[ERROR] Failed to configure networking: ResponseError { code: TransactionAborted, message: "Transaction was aborted" }
I am currently working on a Linux 64x system and do not know what to do. Any idea?Here is my complete code: