Skip to content

Commit

Permalink
Merge pull request nats-io#625 from DerFnoeh/patch-1
Browse files Browse the repository at this point in the history
Fix reconnect/events.md javascript example: type of Events
  • Loading branch information
gcolliso authored Oct 31, 2023
2 parents 6cad9a0 + f3707ed commit c2e1c6a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions using-nats/developing-with-nats/events/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,19 @@ nc.closed().then(() => {
(async () => {
for await (const s of nc.status()) {
switch (s.type) {
case Status.Disconnect:
case Events.Disconnect:
t.log(`client disconnected - ${s.data}`);
break;
case Status.LDM:
case Events.LDM:
t.log("client has been requested to reconnect");
break;
case Status.Update:
case Events.Update:
t.log(`client received a cluster update - ${s.data}`);
break;
case Status.Reconnect:
case Events.Reconnect:
t.log(`client reconnected - ${s.data}`);
break;
case Status.Error:
case Events.Error:
t.log("client got a permissions error");
break;
case DebugEvents.Reconnecting:
Expand Down
2 changes: 1 addition & 1 deletion using-nats/developing-with-nats/reconnect/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const nc = await connect({
(async () => {
for await (const s of nc.status()) {
switch (s.type) {
case Status.Reconnect:
case Events.Reconnect:
t.log(`client reconnected - ${s.data}`);
break;
default:
Expand Down

0 comments on commit c2e1c6a

Please sign in to comment.