Skip to content

Commit 9e7b39f

Browse files
committed
add
1 parent 9dea4b7 commit 9e7b39f

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

lsquic/connectionmanager.nim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ proc startSending*(connman: ConnectionManager) =
5252
try:
5353
let datagrams = await connman.outgoing.get()
5454
let req = datagrams.mapIt((it.taddr, it.data))
55-
# echo "111111111 ", req.len
56-
await connman.udp.sendTo(req)
57-
# echo "2222222"
55+
discard connman.udp.sendTo(req)
56+
except CancelledError as e:
57+
raise e
5858
except CatchableError as e:
5959
debug "Failed to send datagram", errorMsg = e.msg
6060

lsquic/context/io.nim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ proc sendPacketsOut*(
5555
continue
5656
copyMem(addr data[currLen], currIov.iov_base, currIov.iov_len)
5757
currLen += currIov.iov_len.int
58-
58+
59+
if data.len == 0:
60+
continue
5961
let taddr = toTransportAddress(curr.dest_sa)
6062
let datagram = Datagram(data: data, ecn: curr.ecn, taddr: taddr)
6163
quicCtx.outgoing.put(datagram)

0 commit comments

Comments
 (0)