From 06e04e522ed43e561653564914788e7f7e87f4ae Mon Sep 17 00:00:00 2001 From: Moon Wang Date: Wed, 19 Feb 2020 19:55:34 +0800 Subject: [PATCH] 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 {