you may not use this file except in compliance with the License.
You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
+ http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
nng_close( *nn_sock );
return FALSE;
}
-
+
nng_dialer_setopt_ms( *dialer, NNG_OPT_RECONNMAXT, 2000 ); // cap backoff on retries to reasonable amount (2s)
nng_dialer_setopt_ms( *dialer, NNG_OPT_RECONNMINT, 100 ); // start retry 100m after last failure with 2s cap
/*
- Add an endpoint to a route table entry for the group given. If the endpoint isn't in the
+ Add an endpoint to a route table entry for the group given. If the endpoint isn't in the
hash we add it and create the endpoint struct.
The caller must supply the specific route table (we assume it will be pending, but they
} else {
*nn_sock = ep->nn_sock;
state = TRUE;
- }
+ }
return state;
}
//if( DEBUG ) fprintf( stderr, ">>>> _rr returning socket with one choice in group \n" );
state = TRUE;
break;
-
+
default: // need to pick one and adjust rr counts
ep = rrg->epts[rrg->ep_idx++]; // select next endpoint
//if( DEBUG ) fprintf( stderr, ">>>> _rr returning socket with multiple choices in group idx=%d \n", rrg->ep_idx );