Fix compilation errors introduced by latest chronos.
This commit is contained in:
parent
3d10513b3e
commit
1f5d994700
|
@ -545,7 +545,7 @@ proc getSocket(pattern: string,
|
|||
closeSocket(sock)
|
||||
|
||||
# This is forward declaration needed for newDaemonApi()
|
||||
proc listPeers*(api: DaemonAPI): Future[seq[PeerInfo]] {.async.}
|
||||
proc listPeers*(api: DaemonAPI): Future[seq[PeerInfo]] {.async, gcsafe.}
|
||||
|
||||
proc copyEnv(): StringTableRef =
|
||||
## This procedure copy all environment variables into StringTable.
|
||||
|
|
|
@ -26,7 +26,7 @@ type
|
|||
data: seq[byte]): Future[void] {.gcsafe.}
|
||||
|
||||
ValidatorHandler* = proc(topic: string,
|
||||
message: Message): Future[bool] {.closure.}
|
||||
message: Message): Future[bool] {.gcsafe, closure.}
|
||||
|
||||
TopicPair* = tuple[topic: string, handler: TopicHandler]
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ const DefaultBufferSize* = 1024
|
|||
|
||||
type
|
||||
# TODO: figure out how to make this generic to avoid casts
|
||||
WriteHandler* = proc (data: seq[byte]): Future[void]
|
||||
WriteHandler* = proc (data: seq[byte]): Future[void] {.gcsafe.}
|
||||
|
||||
BufferStream* = ref object of LPStream
|
||||
maxSize*: int # buffer's max size in bytes
|
||||
|
@ -335,7 +335,7 @@ proc pipe*(s: BufferStream,
|
|||
|
||||
s.isPiped = true
|
||||
let oldHandler = target.writeHandler
|
||||
proc handler(data: seq[byte]) {.async, closure.} =
|
||||
proc handler(data: seq[byte]) {.async, closure, gcsafe.} =
|
||||
if not isNil(oldHandler):
|
||||
await oldHandler(data)
|
||||
|
||||
|
|
Loading…
Reference in New Issue