From 5bb0afe1755d06a856420741c0174d64138720a0 Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Tue, 12 Jan 2021 16:21:39 +0100 Subject: [PATCH] Fix GCUnsafe2 warning --- quic/connection.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quic/connection.nim b/quic/connection.nim index 84b11b3..61b46e2 100644 --- a/quic/connection.nim +++ b/quic/connection.nim @@ -14,7 +14,7 @@ type udp: DatagramTransport quic: QuicConnection loop: Future[void] - onClose: proc() + onClose: proc() {.gcsafe.} closed: AsyncEvent IncomingConnection = ref object of Connection OutgoingConnection = ref object of Connection @@ -28,7 +28,7 @@ proc `onNewId=`*(connection: Connection, callback: proc(id: ConnectionId)) = proc `onRemoveId=`*(connection: Connection, callback: proc(id: ConnectionId)) = connection.quic.onRemoveId = callback -proc `onClose=`*(connection: Connection, callback: proc()) = +proc `onClose=`*(connection: Connection, callback: proc() {.gcsafe.}) = connection.onClose = callback proc startSending(connection: Connection, remote: TransportAddress) =