From 3b4d88105f791a6868f46095e5bc2734441c9463 Mon Sep 17 00:00:00 2001
From: Garrett D'Amore <garrett@damore.org>
Date: Sun, 26 Nov 2023 12:24:33 -0800
Subject: fixes #1665 docs: document restriction for pipe notify callbacks

One must not attempt to use any functions that access the socket
directly from pipe notification callbacks.
---
 docs/man/nng_pipe_notify.3.adoc | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'docs/man/nng_pipe_notify.3.adoc')

diff --git a/docs/man/nng_pipe_notify.3.adoc b/docs/man/nng_pipe_notify.3.adoc
index 8bb9fcfd..e351129e 100644
--- a/docs/man/nng_pipe_notify.3.adoc
+++ b/docs/man/nng_pipe_notify.3.adoc
@@ -60,6 +60,10 @@ from the socket.
 The underlying transport may be closed at this point, and it is not
 possible communicate using this pipe.
 
+WARNING: The callback _cb_ function must *not* attempt to perform any
+accesses to the socket, as it is called with a lock on the socket held!
+Doing so would thus result in a deadlock.
+
 TIP: The callback _cb_ may close a pipe for any reason by simply closing
 it using xref:nng_pipe_close.3.adoc[`nng_pipe_close()`].
 This might be done before the pipe is added to the socket (during
-- 
cgit v1.2.3-70-g09d2

