Merge lp:~chipaca/ubuntu-push/prepersistance into lp:ubuntu-push
Proposed by
John Lenton
Status: | Merged |
---|---|
Approved by: | John Lenton |
Approved revision: | 63 |
Merged at revision: | 63 |
Proposed branch: | lp:~chipaca/ubuntu-push/prepersistance |
Merge into: | lp:ubuntu-push |
Prerequisite: | lp:~chipaca/ubuntu-push/client-constructor |
Diff against target: |
244 lines (+107/-21) 4 files modified
client/session/levelmap/levelmap.go (+8/-7) client/session/levelmap/levelmap_test.go (+22/-8) client/session/session.go (+22/-4) client/session/session_test.go (+55/-2) |
To merge this branch: | bzr merge lp:~chipaca/ubuntu-push/prepersistance |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Samuele Pedroni | Approve | ||
Review via email:
|
Commit message
change the levelmap interface to return errors
Description of the change
In preparation for the persistence branch, change the levelmap interface to (also) return errors.
To post a comment you must log in.
109 - err := sess.proto. WriteMessage( protocol. AckMsg{ "ack"}) Set(bcast. ChanId, bcast.TopLevel) Error) Errorf( "unable to set level: %v", err)
110 + err := sess.Levels.
111 + if err != nil {
112 + sess.setState(
113 + sess.Log.
114 + return err
115 + }
116 + // the server assumes if we ack the broadcast, we've updated
117 + // our levels. Hence the order.
the server will wait ExchangeTimeout and then kill the session, quicker to send a nack? it seems a serious problem on the client, not sure how you expect to recover without user intervention?
118 + err = sess.proto. WriteMessage( protocol. AckMsg{ "ack"})