need deepCopy; don't do anything if no connections exist
This commit is contained in:
parent
272cb2f497
commit
d5c74f5ce2
|
@ -172,7 +172,9 @@ proc initContext(sock: AsyncSocket, certChainPath: string, keyPath: string,
|
||||||
result.tlsCtx.signCertificate = addr result.signCertificate.super
|
result.tlsCtx.signCertificate = addr result.signCertificate.super
|
||||||
|
|
||||||
proc sendPackets(ctx: QuicP2PContext) =
|
proc sendPackets(ctx: QuicP2PContext) =
|
||||||
let conns = ctx.connections
|
if ctx.connections.len == 0:
|
||||||
|
return
|
||||||
|
let conns = ctx.connections.deepCopy()
|
||||||
for i in 0 .. conns.len - 1:
|
for i in 0 .. conns.len - 1:
|
||||||
var srcAddr, dstAddr: quicly_address_t
|
var srcAddr, dstAddr: quicly_address_t
|
||||||
var dgrams: array[10, IOVec]
|
var dgrams: array[10, IOVec]
|
||||||
|
|
Loading…
Reference in New Issue