mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-04 02:44:44 +00:00
Fixes 9716 [backport] (#9790)
* reuse temporary variable * fixes #9716 [backport] * Declare local vars in safer place
This commit is contained in:
committed by
Andreas Rumpf
parent
47d0582ebf
commit
410fd1deae
@@ -218,7 +218,7 @@ when defineSsl:
|
||||
var data = await recv(socket.fd.AsyncFD, BufferSize, flags)
|
||||
let length = len(data)
|
||||
if length > 0:
|
||||
let ret = bioWrite(socket.bioIn, addr data[0], data.len.cint)
|
||||
let ret = bioWrite(socket.bioIn, addr data[0], length.cint)
|
||||
if ret < 0:
|
||||
raiseSSLError()
|
||||
elif length == 0:
|
||||
|
||||
Reference in New Issue
Block a user