Remove buffer limit on binary protocol decoder
Buffer exhaustion is a problem for the server not the client.
This commit is contained in:
parent
6364db7f69
commit
cf05845f15
|
@ -1,4 +1,4 @@
|
|||
# SPDX-FileCopyrightText: ☭ 2021 Emery Hemingway
|
||||
# SPDX-FileCopyrightText: ☭ Emery Hemingway
|
||||
# SPDX-License-Identifier: Unlicense
|
||||
|
||||
import std/[asyncdispatch, options, streams, tables]
|
||||
|
@ -315,7 +315,7 @@ when defined(posix):
|
|||
initialOid: 0.Oid.some)
|
||||
let relayFut = spawnRelay("unix", turn, ops) do (turn: var Turn; relay: Relay):
|
||||
let facet = turn.facet
|
||||
var wireBuf = newBufferedDecoder()
|
||||
var wireBuf = newBufferedDecoder(0)
|
||||
proc recvCb(pktFut: Future[string]) {.gcsafe.} =
|
||||
if pktFut.failed:
|
||||
run(facet) do (turn: var Turn): stopActor(turn)
|
||||
|
@ -369,7 +369,7 @@ when defined(posix):
|
|||
asyncCheck spawnRelay("stdio", turn, opts) do (turn: var Turn; relay: Relay):
|
||||
let
|
||||
facet = turn.facet
|
||||
asyncStdin = openAsync("/dev/stdin")
|
||||
asyncStdin = newAsyncFile(AsyncFD 0)
|
||||
facet.actor.atExit do (turn: var Turn):
|
||||
close(asyncStdin)
|
||||
var wireBuf = newBufferedDecoder()
|
||||
|
|
Loading…
Reference in New Issue