1
0
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:
Ginger Collison 2020-01-30 16:40:55 -06:00 committed by GitHub
commit 0f9b0ea4e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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