Skip to content

Commit

Permalink
tls_config_server_name should be set by clients only
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Jan 21, 2025
1 parent 7755662 commit e36cc64
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/comms.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,7 @@ SEXP rnng_listen(SEXP socket, SEXP url, SEXP tls, SEXP autostart, SEXP error) {
(xc = nng_url_parse(&up, ur)))
goto exitlevel1;
cfg = (nng_tls_config *) NANO_PTR(tls);
if ((xc = nng_tls_config_server_name(cfg, up->u_hostname)) ||
(xc = nng_listener_set_ptr(*lp, NNG_OPT_TLS_CONFIG, cfg)))
if ((xc = nng_listener_set_ptr(*lp, NNG_OPT_TLS_CONFIG, cfg)))
goto exitlevel2;
nng_url_free(up);
if (start && (xc = nng_listener_start(*lp, 0)))
Expand Down

0 comments on commit e36cc64

Please sign in to comment.