-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timeout #38
Timeout #38
Changes from 8 commits
ec63e48
b0d3547
66925ca
17479ba
2c8b8bd
3281921
3dcc5b4
abbe277
3a7f339
5564657
3031cda
31c25d5
8861342
f3812c3
5bc1e5d
186b6f4
8563eee
a4d36eb
c5dddb8
7f37465
6340084
e9c05b5
e5509ba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,23 @@ | ||
module github.com/ldsec/unlynx | ||
|
||
go 1.14 | ||
|
||
require ( | ||
github.com/BurntSushi/toml v0.3.1 | ||
github.com/Knetic/govaluate v3.0.0+incompatible | ||
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect | ||
github.com/fanliao/go-concurrentMap v0.0.0-20141114143905-7d2d7a5ea67b | ||
github.com/gorilla/websocket v1.4.1 // indirect | ||
github.com/montanaflynn/stats v0.6.3 // indirect | ||
github.com/r0fls/gostats v0.0.0-20180711082619-e793b1fda35c | ||
github.com/satori/go.uuid v1.2.0 | ||
github.com/stretchr/testify v1.3.0 | ||
github.com/urfave/cli v1.22.1 | ||
go.dedis.ch/kyber/v3 v3.0.5 | ||
go.dedis.ch/onet/v3 v3.0.24 | ||
github.com/stretchr/testify v1.4.0 | ||
github.com/urfave/cli v1.22.3 | ||
go.dedis.ch/kyber/v3 v3.0.12 | ||
go.dedis.ch/onet/v3 v3.1.0 | ||
golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073 // indirect | ||
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 // indirect | ||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 // indirect | ||
) | ||
|
||
//replace go.dedis.ch/onet/v3 => ../../../go.dedis.ch/onet |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -10,6 +10,7 @@ package protocolsunlynx | |||||
import ( | ||||||
"errors" | ||||||
"sync" | ||||||
"time" | ||||||
|
||||||
"github.com/ldsec/unlynx/lib" | ||||||
"github.com/ldsec/unlynx/lib/aggregation" | ||||||
|
@@ -195,11 +196,15 @@ func (p *CollectiveAggregationProtocol) Dispatch() error { | |||||
|
||||||
// Announce forwarding down the tree. | ||||||
func (p *CollectiveAggregationProtocol) aggregationAnnouncementPhase() error { | ||||||
dataReferenceMessage := <-p.DataReferenceChannel | ||||||
if !p.IsLeaf() { | ||||||
if err := p.SendToChildren(&dataReferenceMessage.DataReferenceMessage); err != nil { | ||||||
return errors.New("Error sending <DataReferenceMessage>:" + err.Error()) | ||||||
select { | ||||||
case dataReferenceMessage := <-p.DataReferenceChannel: | ||||||
if !p.IsLeaf() { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unneded if, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Arf, I misexplained it; the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ahh I did not get it :P |
||||||
if err := p.SendToChildren(&dataReferenceMessage.DataReferenceMessage); err != nil { | ||||||
return errors.New("Error sending <DataReferenceMessage>:" + err.Error()) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can use the new
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. switched everywhere to fmt.Errorf: 8861342 |
||||||
} | ||||||
} | ||||||
case <-time.After(libunlynx.TIMEOUT): | ||||||
return errors.New(p.ServerIdentity().String() + "didn't get the <dataReferenceMessage> on time.") | ||||||
} | ||||||
return nil | ||||||
} | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last comment:
This will save you hours later on ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added it in 5564657
However now that I updated to the new onet version 3.1.1 the error with the
"E : overlay.go:613 (v3.(*Overlay).nodeDelete) - Error while closing node: Can't shutdown empty ProtocolInstance:"
pops way more often (TestServiceClearAttr). Do you know what changed with this new 3.1 version of Onet?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It disappears if I remove the error condition when calling
tn.SetConfig()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have a simple test-case that I can run to trigger it?
And what do you mean by "removing the error condition when calling
tn.SetConfig()
"?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ineiti see here #38 (comment)
^TestServiceClearAttr$
ingit.luolix.top/ldsec/unlynx/services
I mean this
instead of
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed #38 (comment)