From fe6f307df5d78a54ddd4a56a275043317148fe5a Mon Sep 17 00:00:00 2001 From: Christopher Koch Date: Sat, 19 Jan 2019 21:29:26 +0000 Subject: dhcpv4: build more packets with modifiers Also drop unnecessary return value of Modifier. --- dhcpv4/async/client.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'dhcpv4/async') diff --git a/dhcpv4/async/client.go b/dhcpv4/async/client.go index 9844180..81b10f7 100644 --- a/dhcpv4/async/client.go +++ b/dhcpv4/async/client.go @@ -194,11 +194,7 @@ func (c *Client) remoteAddr() (*net.UDPAddr, error) { // Send inserts a message to the queue to be sent asynchronously. // Returns a future which resolves to response and error. -func (c *Client) Send(message *dhcpv4.DHCPv4, modifiers ...dhcpv4.Modifier) *promise.Future { - for _, mod := range modifiers { - message = mod(message) - } - +func (c *Client) Send(message *dhcpv4.DHCPv4) *promise.Future { p := promise.NewPromise() c.packetsLock.Lock() c.packets[message.TransactionID] = p -- cgit v1.2.3