diff options
Diffstat (limited to 'dhcpv4/async/client.go')
-rw-r--r-- | dhcpv4/async/client.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dhcpv4/async/client.go b/dhcpv4/async/client.go index c37d249..9844180 100644 --- a/dhcpv4/async/client.go +++ b/dhcpv4/async/client.go @@ -132,7 +132,7 @@ func (c *Client) senderLoop(ctx context.Context) { func (c *Client) send(packet *dhcpv4.DHCPv4) { c.packetsLock.Lock() - p := c.packets[packet.TransactionID()] + p := c.packets[packet.TransactionID] c.packetsLock.Unlock() raddr, err := c.remoteAddr() @@ -174,8 +174,8 @@ func (c *Client) receive(_ *dhcpv4.DHCPv4) { } c.packetsLock.Lock() - if p, ok := c.packets[received.TransactionID()]; ok { - delete(c.packets, received.TransactionID()) + if p, ok := c.packets[received.TransactionID]; ok { + delete(c.packets, received.TransactionID) p.Resolve(received) } c.packetsLock.Unlock() @@ -201,7 +201,7 @@ func (c *Client) Send(message *dhcpv4.DHCPv4, modifiers ...dhcpv4.Modifier) *pro p := promise.NewPromise() c.packetsLock.Lock() - c.packets[message.TransactionID()] = p + c.packets[message.TransactionID] = p c.packetsLock.Unlock() c.sendQueue <- message return p.Future |