summaryrefslogtreecommitdiff
path: root/src/core/endpt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/endpt.c')
-rw-r--r--src/core/endpt.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core/endpt.c b/src/core/endpt.c
index 4d3727bc..4d3d9031 100644
--- a/src/core/endpt.c
+++ b/src/core/endpt.c
@@ -618,10 +618,6 @@ nni_ep_getopt(nni_ep *ep, const char *name, void *valp, size_t *szp)
{
nni_tran_ep_option *eo;
- if (strcmp(name, NNG_OPT_URL) == 0) {
- return (nni_getopt_str(ep->ep_url->u_rawurl, valp, szp));
- }
-
for (eo = ep->ep_ops.ep_options; eo && eo->eo_name; eo++) {
int rv;
if (strcmp(eo->eo_name, name) != 0) {
@@ -636,6 +632,13 @@ nni_ep_getopt(nni_ep *ep, const char *name, void *valp, size_t *szp)
return (rv);
}
+ // We provide a fallback on the URL, but let the implementation
+ // override. This allows the URL to be created with wildcards,
+ // that are resolved later.
+ if (strcmp(name, NNG_OPT_URL) == 0) {
+ return (nni_getopt_str(ep->ep_url->u_rawurl, valp, szp));
+ }
+
return (nni_sock_getopt(ep->ep_sock, name, valp, szp));
}