diff --git a/protocol.go b/protocol.go
index e5d36dcafab44aa01ddc392d131f4006a616bd8a..bc98700a13a083aa216aef7399d5c58b0c1df181 100644
--- a/protocol.go
+++ b/protocol.go
@@ -125,7 +125,9 @@ func (w *ResponseWriterMsg) Send(args any, e error) (err error) {
 		return nil
 	}
 	w.msg = cm.response(args)
-	close(w.notifications)
+	if w.notifications != nil {
+		close(w.notifications)
+	}
 	return nil
 }