mirror of
https://github.com/amnezia-vpn/amneziawg-go.git
synced 2026-06-02 06:23:45 +02:00
Merge pull request #83 from ygurov/bugfix/itime-throws-when-empty
fix: add check for non-empty itime
This commit is contained in:
@@ -428,6 +428,11 @@ func (device *Device) handleDeviceLine(key, value string, tempAwg *awg.Protocol)
|
||||
tempAwg.HandshakeHandler.ControlledJunk.AppendGenerator(generators)
|
||||
tempAwg.HandshakeHandler.IsSet = true
|
||||
case "itime":
|
||||
if len(value) == 0 {
|
||||
device.log.Verbosef("UAPI: received empty itime")
|
||||
return nil
|
||||
}
|
||||
|
||||
itime, err := strconv.ParseInt(value, 10, 64)
|
||||
if err != nil {
|
||||
return ipcErrorf(ipc.IpcErrorInvalid, "parse itime %w", err)
|
||||
|
||||
Reference in New Issue
Block a user