From ffe4837710a431aa7dc07a5759fa87daaf5991a6 Mon Sep 17 00:00:00 2001 From: David Tillery Date: Mon, 23 Nov 2020 01:16:50 -0500 Subject: [PATCH] clean up some code blocks --- developing-with-nats/connecting/misc.md | 4 ++-- developing-with-nats/reconnect/buffer.md | 4 ++-- developing-with-nats/reconnect/disable.md | 2 +- developing-with-nats/reconnect/random.md | 6 ++++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/developing-with-nats/connecting/misc.md b/developing-with-nats/connecting/misc.md index 474d4b6..71f8ad0 100644 --- a/developing-with-nats/connecting/misc.md +++ b/developing-with-nats/connecting/misc.md @@ -43,7 +43,7 @@ nc.on('error', (err) => { t.log('client got an error:', err); }); nc.on('connect', () => { - t.log(nc.info.max_payload); + t.log(nc.info.max_payload); }); ``` {% endtab %} @@ -65,7 +65,7 @@ print("Maximum payload is %d bytes" % nc.max_payload) require 'nats/client' NATS.start(max_outstanding_pings: 5) do |nc| - nc.on_reconnect do + nc.on_reconnect do puts "Got reconnected to #{nc.connected_server}" end diff --git a/developing-with-nats/reconnect/buffer.md b/developing-with-nats/reconnect/buffer.md index df9a20c..f85e1de 100644 --- a/developing-with-nats/reconnect/buffer.md +++ b/developing-with-nats/reconnect/buffer.md @@ -38,7 +38,7 @@ nc.close(); {% tab title="JavaScript" %} ```javascript -// Reconnect buffer size is not configurable on NATS Javascript client +// Reconnect buffer size is not configurable on NATS JavaScript client ``` {% endtab %} @@ -56,7 +56,7 @@ nc.close(); {% tab title="TypeScript" %} ```typescript -// Reconnect buffer size is not configurable on NATS Typescript client +// Reconnect buffer size is not configurable on NATS TypeScript client ``` {% endtab %} diff --git a/developing-with-nats/reconnect/disable.md b/developing-with-nats/reconnect/disable.md index 2fe9456..fae8773 100644 --- a/developing-with-nats/reconnect/disable.md +++ b/developing-with-nats/reconnect/disable.md @@ -32,7 +32,7 @@ nc.close(); {% tab title="JavaScript" %} ```javascript -llet nc = NATS.connect({ +let nc = NATS.connect({ reconnect: false, servers: ["nats://demo.nats.io:4222"] }); diff --git a/developing-with-nats/reconnect/random.md b/developing-with-nats/reconnect/random.md index 23e62a8..90931c1 100644 --- a/developing-with-nats/reconnect/random.md +++ b/developing-with-nats/reconnect/random.md @@ -40,7 +40,8 @@ nc.close(); ```javascript let nc = NATS.connect({ noRandomize: true, - servers: ["nats://127.0.0.1:4443", + servers: [ + "nats://127.0.0.1:4443", "nats://demo.nats.io:4222" ] }); @@ -83,7 +84,8 @@ end // will throw an exception if connection fails let nc = await connect({ noRandomize: true, - servers: ["nats://127.0.0.1:4443", + servers: [ + "nats://127.0.0.1:4443", "nats://demo.nats.io:4222" ] });