From 885cbbe39ce955b230a731c8a9205b0f45a5c471 Mon Sep 17 00:00:00 2001 From: Hu Jun Date: Sat, 27 Jun 2020 12:24:29 -0700 Subject: remove timeout code from Release(), since it is unnecessary after some more testing Signed-off-by: Hu Jun --- dhcpv4/nclient4/lease.go | 2 -- 1 file changed, 2 deletions(-) (limited to 'dhcpv4/nclient4') 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) -- cgit v1.2.3