Skip to content

Commit

Permalink
Update zstack to respect context.DeadlineExceeded, also libraries.
Browse files Browse the repository at this point in the history
  • Loading branch information
pwood committed Oct 25, 2020
1 parent 1d8caef commit 0192726
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 16 deletions.
3 changes: 1 addition & 2 deletions events.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package zstack

import (
"context"
"github.com/shimmeringbee/zigbee"
)

func (z *ZStack) sendEvent(event interface{}) {
Expand All @@ -14,6 +13,6 @@ func (z *ZStack) ReadEvent(ctx context.Context) (interface{}, error) {
case event := <-z.events:
return event, nil
case <-ctx.Done():
return nil, zigbee.ContextExpired
return nil, context.DeadlineExceeded
}
}
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ module github.com/shimmeringbee/zstack
go 1.14

require (
github.com/shimmeringbee/bytecodec v0.0.0-20200706123551-2f3d1ec55300
github.com/shimmeringbee/retry v0.0.0-20200527220501-bda1ff6caa51
github.com/shimmeringbee/unpi v0.0.0-20200506070516-5725943ca9ba
github.com/shimmeringbee/zigbee v0.0.0-20200919192601-5113653c2fd2
github.com/shimmeringbee/bytecodec v0.0.0-20201010084809-f41297878cdb
github.com/shimmeringbee/retry v0.0.0-20201009192801-17b4f327c3e1
github.com/shimmeringbee/unpi v0.0.0-20201009192802-a3cad1a91f66
github.com/shimmeringbee/zigbee v0.0.0-20201025164059-d8035d706a71
github.com/stretchr/testify v1.6.1
)
18 changes: 8 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/shimmeringbee/bytecodec v0.0.0-20200216120857-49d677293817/go.mod h1:J/gvzi9IgGBHP1cBn++bqJ4tchSbgS10N2lmGMlqD3M=
github.com/shimmeringbee/bytecodec v0.0.0-20200706123551-2f3d1ec55300 h1:W1jIqAYWJdUPJmvT0DtW1CU2RzWcNR6APmPDsEO9L1I=
github.com/shimmeringbee/bytecodec v0.0.0-20200706123551-2f3d1ec55300/go.mod h1:WYnxfxTJ45UQ+xeAuuTSIalcEepgP8Rb7T/OhCaDdgo=
github.com/shimmeringbee/retry v0.0.0-20200527220501-bda1ff6caa51 h1:dIo9CchGszNbGAWS/L3zqTIANNUo6iI/W9g5WQbNCVM=
github.com/shimmeringbee/retry v0.0.0-20200527220501-bda1ff6caa51/go.mod h1:FFeFkkqdD9vdDFr2la9PkSTQr6qgU9aBiGU3QKn8ZKY=
github.com/shimmeringbee/unpi v0.0.0-20200506070516-5725943ca9ba h1:xPNCkNb1UkI2jg+GC77RPIQjCzMPIudOHduyszGRaDQ=
github.com/shimmeringbee/unpi v0.0.0-20200506070516-5725943ca9ba/go.mod h1:iAt5R5HT+VC7B9U77uBmN5Z6+DJo4U0z6ag68NH2mMw=
github.com/shimmeringbee/zigbee v0.0.0-20200919105751-2712692b7d55 h1:ivgKhWQFEn6NVvAm3tKj+4OpN9aYLQUH3TB7xqEpzoQ=
github.com/shimmeringbee/zigbee v0.0.0-20200919105751-2712692b7d55/go.mod h1:GMA6rVpzvUK16cZwi8uW11JUTx8xUGOk5DbkXYWvm/8=
github.com/shimmeringbee/zigbee v0.0.0-20200919192601-5113653c2fd2 h1:CCN8fmgPZES4MIkgG6OB1/T2mp6Rnw6gLyuKdh49DBM=
github.com/shimmeringbee/zigbee v0.0.0-20200919192601-5113653c2fd2/go.mod h1:GMA6rVpzvUK16cZwi8uW11JUTx8xUGOk5DbkXYWvm/8=
github.com/shimmeringbee/bytecodec v0.0.0-20201010084809-f41297878cdb h1:eIpxXfxOLwQAQ6/C+Vaq/wILOTG/os+WruItCFdXXFU=
github.com/shimmeringbee/bytecodec v0.0.0-20201010084809-f41297878cdb/go.mod h1:WYnxfxTJ45UQ+xeAuuTSIalcEepgP8Rb7T/OhCaDdgo=
github.com/shimmeringbee/retry v0.0.0-20201009192801-17b4f327c3e1 h1:XHZWCYRj+2lAwQhchW+SGbSeF/gTpZwROonbyT9u9A4=
github.com/shimmeringbee/retry v0.0.0-20201009192801-17b4f327c3e1/go.mod h1:FFeFkkqdD9vdDFr2la9PkSTQr6qgU9aBiGU3QKn8ZKY=
github.com/shimmeringbee/unpi v0.0.0-20201009192802-a3cad1a91f66 h1:O6jD3B8FDka2tRxz/CETPCUYbA8UX9DYoBSM4m1kxT8=
github.com/shimmeringbee/unpi v0.0.0-20201009192802-a3cad1a91f66/go.mod h1:iAt5R5HT+VC7B9U77uBmN5Z6+DJo4U0z6ag68NH2mMw=
github.com/shimmeringbee/zigbee v0.0.0-20201025164059-d8035d706a71 h1:tPqsPIbaKd/9oj0V3zMJuJIqKuAjK7vki9zhSTpw7m8=
github.com/shimmeringbee/zigbee v0.0.0-20201025164059-d8035d706a71/go.mod h1:GMA6rVpzvUK16cZwi8uW11JUTx8xUGOk5DbkXYWvm/8=
github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.3.0 h1:NGXK3lHquSN08v5vWalVI/L8XU9hdzE/G6xsrze47As=
Expand Down

0 comments on commit 0192726

Please sign in to comment.