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:
parent
c84fee1398
commit
9a6968d485
@ -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
|
// and the state of the connection may have changed when
|
||||||
// the callback is invoked.
|
// the callback is invoked.
|
||||||
nc, err := nats.Connect("demo.nats.io",
|
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
|
// handle disconnect error event
|
||||||
}),
|
}),
|
||||||
nats.ReconnectHandler(func(nc *nats.Conn) {
|
nats.ReconnectHandler(func(nc *nats.Conn) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user