mirror of
https://github.com/amnezia-vpn/amneziawg-go.git
synced 2025-08-02 09:52:49 +02:00
fix: add check for non-empty itime
This commit is contained in:
parent
3b85f992f3
commit
0d683ef3dc
1 changed files with 5 additions and 0 deletions
|
@ -428,6 +428,11 @@ func (device *Device) handleDeviceLine(key, value string, tempAwg *awg.Protocol)
|
||||||
tempAwg.HandshakeHandler.ControlledJunk.AppendGenerator(generators)
|
tempAwg.HandshakeHandler.ControlledJunk.AppendGenerator(generators)
|
||||||
tempAwg.HandshakeHandler.IsSet = true
|
tempAwg.HandshakeHandler.IsSet = true
|
||||||
case "itime":
|
case "itime":
|
||||||
|
if len(value) == 0 {
|
||||||
|
device.log.Verbosef("UAPI: received empty itime")
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
itime, err := strconv.ParseInt(value, 10, 64)
|
itime, err := strconv.ParseInt(value, 10, 64)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return ipcErrorf(ipc.IpcErrorInvalid, "parse itime %w", err)
|
return ipcErrorf(ipc.IpcErrorInvalid, "parse itime %w", err)
|
||||||
|
|
Loading…
Add table
Reference in a new issue