Skip to content

Commit

Permalink
juice, refactor: return the corresponding error code when binding the…
Browse files Browse the repository at this point in the history
… port fails.
  • Loading branch information
zhi-lu committed Jun 11, 2024
1 parent b42da32 commit 7545db9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions juice/src/conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@ int juice_bind_stun(const char *bind_address, int local_port, juice_cb_stun_bind
conn_registry_t *registry = acquire_registry(entry, &config);
mutex_unlock(&entry->mutex);

if (!registry)
return -2;

registry->cb_stun_binding = cb;
mutex_unlock(&registry->mutex);

Expand Down

0 comments on commit 7545db9

Please sign in to comment.