Remove pending sync var
Since we are no longer syncing on connect - remove unused pending sync variable. Signed-off-by: Artem Savkov <artem.savkov@gmail.com>
This commit is contained in:
parent
44eab7466b
commit
6500934bba
|
@ -521,9 +521,6 @@ static void discord_handle_server(struct im_connection *ic, json_value *sinfo,
|
|||
discord_handle_voice_state(ic, vsinfo, sdata->id);
|
||||
}
|
||||
}
|
||||
|
||||
discord_ws_sync_server(dd, sdata->id);
|
||||
dd->pending_sync++;
|
||||
} else {
|
||||
server_info *sdata = get_server_by_id(dd, id);
|
||||
if (sdata == NULL) {
|
||||
|
@ -742,7 +739,7 @@ void discord_handle_message(struct im_connection *ic, json_value *minfo,
|
|||
if (cinfo == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
time_t tstamp = use_tstamp ? parse_iso_8601(json_o_str(minfo, "timestamp")) : 0;
|
||||
|
||||
if (action == ACTION_CREATE) {
|
||||
|
@ -947,12 +944,6 @@ gboolean discord_parse_message(struct im_connection *ic, gchar *buf, guint64 siz
|
|||
discord_handle_presence(ic, pinfo, id);
|
||||
}
|
||||
}
|
||||
|
||||
dd->pending_sync--;
|
||||
if (dd->pending_sync < 1 && dd->state == WS_ALMOST_READY) {
|
||||
dd->state = WS_READY;
|
||||
imcb_connected(ic);
|
||||
}
|
||||
} else if (g_strcmp0(event, "VOICE_STATE_UPDATE") == 0) {
|
||||
json_value *vsinfo = json_o_get(js, "d");
|
||||
discord_handle_voice_state(ic, vsinfo, json_o_str(vsinfo, "guild_id"));
|
||||
|
|
|
@ -73,7 +73,6 @@ typedef struct _discord_data {
|
|||
gint inpa;
|
||||
gint wsid;
|
||||
guint64 seq;
|
||||
guint pending_sync;
|
||||
GSList *pending_reqs;
|
||||
GSList *pending_events;
|
||||
gboolean reconnecting;
|
||||
|
|
Loading…
Reference in New Issue