From 91150588036fc3d8611f659fad063138e25b2cd8 Mon Sep 17 00:00:00 2001 From: bptato Date: Sun, 24 Mar 2024 12:04:46 +0100 Subject: bufreader: add initPacketReader --- src/server/buffer.nim | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/server') diff --git a/src/server/buffer.nim b/src/server/buffer.nim index bcc39aa2..e952d9aa 100644 --- a/src/server/buffer.nim +++ b/src/server/buffer.nim @@ -1791,11 +1791,9 @@ macro bufferDispatcher(funs: static ProxyMap; buffer: Buffer; return switch proc readCommand(buffer: Buffer) = + var r = buffer.pstream.initPacketReader() var cmd: BufferCommand - var len: int var packetid: int - buffer.pstream.sread(len) - var r = buffer.pstream.initReader(len) r.sread(cmd) r.sread(packetid) bufferDispatcher(ProxyFunctions, buffer, cmd, packetid, r) -- cgit 1.4.1-2-gfad0