diff options
author | Hu Jun <hujun.work@gmail.com> | 2020-06-27 12:24:29 -0700 |
---|---|---|
committer | Hu Jun <hujun.work@gmail.com> | 2020-06-27 12:24:29 -0700 |
commit | 885cbbe39ce955b230a731c8a9205b0f45a5c471 (patch) | |
tree | e30659d8fd43bb1afb059dcb85ec2e658335d12a | |
parent | 1d36507b4f6275378782e305dfe1839491306ace (diff) |
remove timeout code from Release(), since it is unnecessary after some more testing
Signed-off-by: Hu Jun <hujun.work@gmail.com>
-rw-r--r-- | dhcpv4/nclient4/lease.go | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/dhcpv4/nclient4/lease.go b/dhcpv4/nclient4/lease.go index 9f9d67d..3bd485b 100644 --- a/dhcpv4/nclient4/lease.go +++ b/dhcpv4/nclient4/lease.go @@ -51,8 +51,6 @@ func (c *Client) Release(lease *Lease) error { if err != nil { return err } - timeout := time.Now().Add(3 * time.Second) - c.conn.SetWriteDeadline(timeout) _, err = c.conn.WriteTo(req.ToBytes(), &net.UDPAddr{IP: lease.ACK.Options.Get(dhcpv4.OptionServerIdentifier), Port: 67}) if err == nil { c.logger.PrintMessage("sent message:", req) |