WIP yield reset
This commit is contained in:
parent
946d113aad
commit
e0417a8a4d
|
@ -228,7 +228,7 @@ public class ConnectionManager : Object {
|
|||
debug("[%s %p] Connection error: %s", account.bare_jid.to_string(), stream, e.message);
|
||||
|
||||
change_connection_state(account, ConnectionState.DISCONNECTED);
|
||||
connections[account].reset();
|
||||
yield connections[account].reset();
|
||||
|
||||
StreamError.Flag? flag = stream.get_flag(StreamError.Flag.IDENTITY);
|
||||
if (flag != null) {
|
||||
|
@ -273,8 +273,10 @@ public class ConnectionManager : Object {
|
|||
debug("[%s %p] Ping timeouted. Reconnecting", account.bare_jid.to_string(), stream);
|
||||
change_connection_state(account, ConnectionState.DISCONNECTED);
|
||||
|
||||
connections[account].reset();
|
||||
connect_stream.begin(account);
|
||||
connections[account].reset.begin((_, res) => {
|
||||
connections[account].reset.end(res);
|
||||
connect_stream.begin(account);
|
||||
});
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
@ -306,8 +308,10 @@ public class ConnectionManager : Object {
|
|||
else {
|
||||
change_connection_state(account, ConnectionState.DISCONNECTED);
|
||||
|
||||
connections[account].reset();
|
||||
connect_stream.begin(account);
|
||||
connections[account].reset.begin((_, res) => {
|
||||
connections[account].reset.end(res);
|
||||
connect_stream.begin(account);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue