dedis / cothority

Scalable collective authority
Other
425 stars 106 forks source link

evoting #1084

Closed ineiti closed 6 years ago

ineiti commented 6 years ago

When shuffling with too little users, an error is created, but not received by the js-frontend.

gnarula commented 6 years ago

It's got to do with how cothorityjs is handling websocket errors. https://github.com/dedis/cothority/blob/master/external/js/cothority/lib/net/net.js#L64 event.wasClean is false only if the client doesn't receive the closing frame [https://stackoverflow.com/a/43588055]. What we should instead be checking for is if event.code == 4000 [https://github.com/dedis/onet/blob/master/websocket.go#L164]

nikkolasg commented 6 years ago

Good catch.

What we should instead be checking for

Do both actually, because a connection might also terminate abruptly and the js needs to be notified.

ineiti commented 6 years ago

@gnarula - can you create a PR for that, please?

ineiti commented 6 years ago

Done