1
0
mirror of https://github.com/taigrr/nats.docs synced 2025-01-18 04:03:23 -08:00

GitBook: [master] 178 pages modified

This commit is contained in:
Ginger Collison
2020-09-04 20:10:37 +00:00
committed by gitbook-bot
parent 30e3cdc1fa
commit d21aed4887
13 changed files with 160 additions and 26 deletions

View File

@@ -91,16 +91,16 @@ let nc = await connect({
nnatsConnection *conn = NULL;
natsOptions *opts = NULL;
natsStatus s = NATS_OK;
s = natsOptions_Create(&opts);
if (s == NATS_OK)
// Set the timeout to 10 seconds (10,000 milliseconds)
s = natsOptions_SetTimeout(opts, 10000);
if (s == NATS_OK)
s = natsConnection_Connect(&conn, opts);
(...)
// Destroy objects that were created
natsConnection_Destroy(conn);
natsOptions_Destroy(opts);