From af9dedf75a1d7e2b9df8b79db14246b7b37043d9 Mon Sep 17 00:00:00 2001 From: Christian Ulrich Date: Sun, 23 Aug 2020 16:11:53 +0200 Subject: [PATCH] pass exact size to recv --- examples/app/app.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/app/app.nim b/examples/app/app.nim index a6b5271..72feb65 100644 --- a/examples/app/app.nim +++ b/examples/app/app.nim @@ -228,7 +228,7 @@ proc runApp(serverHostname: string, serverPort: Port, peerId: string, break echo "accepted!" await sock.send("ping") - let msg = await sock.recv(1000) + let msg = await sock.recv(4) echo "received message: ", msg else: @@ -238,7 +238,7 @@ proc runApp(serverHostname: string, serverPort: Port, peerId: string, asyncCheck handleServerMessages(serverConn) let sock = await punchHole(punchdConn, serverConn, peerId, otherPeerId) echo "connected!" - let msg = await sock.recv(1000) + let msg = await sock.recv(4) echo "received message: ", msg await sock.send("pong")