func disconnectedHandler(nc *nats.Conn) { if nc.LastError() != nil { log.Fatalf("connection %q has been disconnected: %v", nc.Opts.Name, nc.LastError()) } }