X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmeshlink.c;h=496e5d3c753763560bf173591a3aa8f883559dd6;hb=7075cf7bc81998b6cf72ccb6748050cd40b006be;hp=9641173af047cb987be69ec72fd22e8852ef22f6;hpb=dfb34b95e3ba8e98b13566745b24dc2beb1cab7b;p=meshlink diff --git a/src/meshlink.c b/src/meshlink.c index 9641173a..496e5d3c 100644 --- a/src/meshlink.c +++ b/src/meshlink.c @@ -2339,7 +2339,7 @@ bool meshlink_set_port(meshlink_handle_t *mesh, int port) { done: pthread_mutex_unlock(&(mesh->mesh_mutex)); - return rval; + return rval && meshlink_get_port(mesh) == port; } void meshlink_set_invitation_timeout(meshlink_handle_t *mesh, int timeout) {