mirror of
https://github.com/status-im/nim-eth-p2p.git
synced 2025-02-05 19:43:29 +00:00
Fixed potential crash
This commit is contained in:
parent
128460099a
commit
5523cb44db
@ -215,7 +215,7 @@ proc dispatchMsg(peer: Peer, msgId: int, msgData: var Rlp) =
|
||||
proc send(p: Peer, data: BytesRange) {.async.} =
|
||||
var cipherText = encryptMsg(data, p.secretsState)
|
||||
GC_ref(cipherText)
|
||||
result = p.socket.send(addr cipherText[0], cipherText.len)
|
||||
await p.socket.send(addr cipherText[0], cipherText.len)
|
||||
GC_unref(cipherText)
|
||||
|
||||
proc fullRecvInto(s: AsyncSocket, buffer: pointer, bufferLen: int) {.async.} =
|
||||
|
Loading…
x
Reference in New Issue
Block a user