summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4/async
diff options
context:
space:
mode:
authorChristopher Koch <c@chrisko.ch>2019-01-19 21:29:26 +0000
committerinsomniac <insomniacslk@users.noreply.github.com>2019-01-19 22:32:20 +0000
commitfe6f307df5d78a54ddd4a56a275043317148fe5a (patch)
tree96c357bf87bd4939b503763ffc94c66aa73e336c /dhcpv4/async
parent5e6e8baddaa29b866abe0b865e0c66c9190ec2f7 (diff)
dhcpv4: build more packets with modifiers
Also drop unnecessary return value of Modifier.
Diffstat (limited to 'dhcpv4/async')
-rw-r--r--dhcpv4/async/client.go6
1 files changed, 1 insertions, 5 deletions
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