protocol-native: set error when add_event fails

This commit is contained in:
Wim Taymans 2024-02-08 09:48:33 +01:00
parent 9cb234dda9
commit 51e0720113

View file

@ -1430,8 +1430,10 @@ add_server(struct pw_protocol *protocol,
if ((res = add_socket(protocol, s)) < 0)
goto error;
if ((s->resume = pw_loop_add_event(s->loop, do_resume, s)) == NULL)
if ((s->resume = pw_loop_add_event(s->loop, do_resume, s)) == NULL) {
res = -errno;
goto error;
}
pw_log_info("%p: Listening on '%s'", protocol, name);