1
0
mirror of https://github.com/taigrr/nats.docs synced 2025-01-18 04:03:23 -08:00

Update events.md

`ConnErrHandler` function prototype needs updating in example snippet
This commit is contained in:
Pu-Chen Mao 2020-02-12 18:02:19 +08:00 committed by GitHub
parent c84fee1398
commit 9a6968d485
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {