connection_manager.vala: Use yield on disconnect()

This commit is contained in:
Xavier Del Campo Romero 2023-10-07 00:56:52 +02:00
parent 2c292f16c8
commit 8cd96e0a14
Signed by: xavi
GPG Key ID: 84FF3612A9BF43F2
1 changed files with 3 additions and 3 deletions

View File

@ -56,15 +56,15 @@ public class ConnectionManager : Object {
public bool acked;
public Connection() {
reset();
reset.begin();
}
public void reset() {
public async void reset() {
acked = false;
if (stream != null) {
stream.detach_modules();
stream.disconnect.begin();
yield stream.disconnect();
}
stream = null;
uuid = Xmpp.random_uuid();