mirror of
https://github.com/taigrr/nats.docs
synced 2025-01-18 04:03:23 -08:00
Merge pull request #42 from dwaynebradley/master
DisconnectErrHandler should be used now
This commit is contained in:
commit
0f9b0ea4e5
@ -9,8 +9,8 @@ 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.DisconnectHandler(func(nc *nats.Conn) {
|
||||
// handle disconnect event
|
||||
nats.DisconnectErrHandler(func(nc *nats.Conn) {
|
||||
// handle disconnect error event
|
||||
}),
|
||||
nats.ReconnectHandler(func(nc *nats.Conn) {
|
||||
// handle reconnect event
|
||||
|
Loading…
x
Reference in New Issue
Block a user