impl-node: only complete the last pending state

If we get a complete reply from an old state change, ignore it.
This commit is contained in:
Wim Taymans 2020-09-15 20:33:30 +02:00
parent 23e7a54340
commit e0ce311bc0

View file

@ -1866,6 +1866,9 @@ static void on_state_complete(void *obj, void *data, int res, uint32_t seq)
enum pw_node_state state = SPA_PTR_TO_INT(data);
char *error = NULL;
if (impl->pending != state)
return;
pw_log_debug(NAME" %p: state complete res:%d seq:%d", node, res, seq);
if (impl->last_error < 0) {
res = impl->last_error;