diff options
| author | Garrett D'Amore <garrett@damore.org> | 2019-12-26 16:23:11 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2019-12-26 16:56:33 -0800 |
| commit | a31df988bb59e438e0eca9f7fb057a2c8ff7b54b (patch) | |
| tree | e5f7ba187069125e227235473da6290d234aeb43 /src/platform/posix/posix_ipc.h | |
| parent | d590eceab74772a8d5fa50c94074b09927577ee4 (diff) | |
| download | nng-a31df988bb59e438e0eca9f7fb057a2c8ff7b54b.tar.gz nng-a31df988bb59e438e0eca9f7fb057a2c8ff7b54b.tar.bz2 nng-a31df988bb59e438e0eca9f7fb057a2c8ff7b54b.zip | |
fixes #1037 http client crashes (pthread lock bugs)
This reference counts both TCP and IPC dialers running on POSIX
configurations, as we need to take care not to destroy the dialer
until any streams associated with are completely destroyed.
Diffstat (limited to 'src/platform/posix/posix_ipc.h')
| -rw-r--r-- | src/platform/posix/posix_ipc.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/platform/posix/posix_ipc.h b/src/platform/posix/posix_ipc.h index 7fdff4aa..f0b9b5ef 100644 --- a/src/platform/posix/posix_ipc.h +++ b/src/platform/posix/posix_ipc.h @@ -37,10 +37,13 @@ struct nni_ipc_dialer { bool closed; nni_mtx mtx; nng_sockaddr sa; + int refcnt; + bool fini; }; extern int nni_posix_ipc_init(nni_ipc_conn **, nni_posix_pfd *); extern void nni_posix_ipc_start(nni_ipc_conn *); +extern void nni_posix_ipc_dialer_rele(nni_ipc_dialer *); #endif // NNG_PLATFORM_POSIX |
