mirror of
https://codeberg.org/emersion/gamja.git
synced 2024-11-14 19:05:01 -05:00
Make first server check more robust when disconnecting
A disconnect/reconnect cycle will bump the server ID.
This commit is contained in:
parent
ab3569e104
commit
a172c810e9
1 changed files with 2 additions and 1 deletions
|
@ -1414,6 +1414,7 @@ export default class App extends Component {
|
|||
});
|
||||
|
||||
let disconnectAll = client && !client.params.bouncerNetwork && client.caps.enabled.has("soju.im/bouncer-networks");
|
||||
let isFirstServer = this.state.servers.keys().next().value === buf.server;
|
||||
|
||||
this.disconnect(buf.server);
|
||||
|
||||
|
@ -1439,7 +1440,7 @@ export default class App extends Component {
|
|||
}
|
||||
|
||||
// TODO: only clear autoconnect if this server is stored there
|
||||
if (buf.server == 1) {
|
||||
if (isFirstServer) {
|
||||
store.autoconnect.put(null);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue