mirror of
https://github.com/logos-storage/logos-storage-nim-dht.git
synced 2026-01-04 06:23:05 +00:00
add raises annotation
This commit is contained in:
parent
b68d33cef2
commit
76004d35af
@ -71,7 +71,7 @@
|
|||||||
## more requests will be needed for a lookup (adding bandwidth and latency).
|
## more requests will be needed for a lookup (adding bandwidth and latency).
|
||||||
## This might be a concern for mobile devices.
|
## This might be a concern for mobile devices.
|
||||||
|
|
||||||
{.push raises: [Defect].}
|
{.push raises: [].}
|
||||||
|
|
||||||
import
|
import
|
||||||
std/[tables, sets, options, math, sequtils, algorithm, strutils],
|
std/[tables, sets, options, math, sequtils, algorithm, strutils],
|
||||||
|
|||||||
@ -36,7 +36,7 @@ type
|
|||||||
proc sendToA(t: Transport, a: Address, data: seq[byte]) =
|
proc sendToA(t: Transport, a: Address, data: seq[byte]) =
|
||||||
let ta = initTAddress(a.ip, a.port)
|
let ta = initTAddress(a.ip, a.port)
|
||||||
let f = t.transp.sendTo(ta, data)
|
let f = t.transp.sendTo(ta, data)
|
||||||
f.callback = proc(data: pointer) {.gcsafe.} =
|
f.callback = proc(data: pointer) {.gcsafe, raises: [].} =
|
||||||
if f.failed:
|
if f.failed:
|
||||||
# Could be `TransportUseClosedError` in case the transport is already
|
# Could be `TransportUseClosedError` in case the transport is already
|
||||||
# closed, or could be `TransportOsError` in case of a socket error.
|
# closed, or could be `TransportOsError` in case of a socket error.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user