From 9a6968d485cd1894af3d865abeeb425881174de3 Mon Sep 17 00:00:00 2001 From: Pu-Chen Mao Date: Wed, 12 Feb 2020 18:02:19 +0800 Subject: [PATCH] Update events.md `ConnErrHandler` function prototype needs updating in example snippet --- developing-with-nats/reconnect/events.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/developing-with-nats/reconnect/events.md b/developing-with-nats/reconnect/events.md index 8ea3bef..82036a4 100644 --- a/developing-with-nats/reconnect/events.md +++ b/developing-with-nats/reconnect/events.md @@ -9,7 +9,7 @@ Because reconnect is primarily under the covers many libraries provide an event // and the state of the connection may have changed when // the callback is invoked. nc, err := nats.Connect("demo.nats.io", - nats.DisconnectErrHandler(func(nc *nats.Conn) { + nats.DisconnectErrHandler(func(nc *nats.Conn, err error) { // handle disconnect error event }), nats.ReconnectHandler(func(nc *nats.Conn) {