From 06e04e522ed43e561653564914788e7f7e87f4ae Mon Sep 17 00:00:00 2001 From: Moon Wang Date: Wed, 19 Feb 2020 19:55:34 +0800 Subject: [PATCH 1/2] flush wrongly used in the sample code --- developing-with-nats/sending/request_reply.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/developing-with-nats/sending/request_reply.md b/developing-with-nats/sending/request_reply.md index 493764f..0ac521b 100644 --- a/developing-with-nats/sending/request_reply.md +++ b/developing-with-nats/sending/request_reply.md @@ -119,10 +119,10 @@ sub, err := nc.SubscribeSync(replyTo) if err != nil { log.Fatal(err) } -nc.Flush() -// Send the request +// Send the request immeditately nc.PublishRequest(subject, replyTo, []byte(input)) +nc.Flush() // Wait for a single response for { From c4042ca7ab6b4a4ef9fd1cad6e004dbcd335b2ff Mon Sep 17 00:00:00 2001 From: Ginger Collison Date: Fri, 1 May 2020 13:37:12 -0500 Subject: [PATCH 2/2] Update request_reply.md --- developing-with-nats/sending/request_reply.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/developing-with-nats/sending/request_reply.md b/developing-with-nats/sending/request_reply.md index 0ac521b..d1060ad 100644 --- a/developing-with-nats/sending/request_reply.md +++ b/developing-with-nats/sending/request_reply.md @@ -120,7 +120,7 @@ if err != nil { log.Fatal(err) } -// Send the request immeditately +// Send the request immediately nc.PublishRequest(subject, replyTo, []byte(input)) nc.Flush()