From 46117f86d47da376b37c6fb4d72ee202de599c9b Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Wed, 1 Jan 2025 15:38:19 -0800 Subject: demos: raw and async demos should use nng_init --- demo/async/client.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'demo/async/client.c') diff --git a/demo/async/client.c b/demo/async/client.c index bf9389a0..18622089 100644 --- a/demo/async/client.c +++ b/demo/async/client.c @@ -1,4 +1,4 @@ -// Copyright 2018 Staysail Systems, Inc. +// Copyright 2025 Staysail Systems, Inc. // Copyright 2018 Capitar IT Group BV // // This software is supplied under the terms of the MIT License, a @@ -26,7 +26,6 @@ #include #include -#include #include void @@ -49,6 +48,10 @@ client(const char *url, const char *msecstr) msec = atoi(msecstr); + if ((rv = nng_init(NULL)) != 0) { + fatal("nng_init", rv); + } + if ((rv = nng_req0_open(&sock)) != 0) { fatal("nng_req0_open", rv); } -- cgit v1.2.3-70-g09d2