Code review comment for lp:~chipaca/ubuntu-push/prepersistance

Revision history for this message
Samuele Pedroni (pedronis) wrote :

109 - err := sess.proto.WriteMessage(protocol.AckMsg{"ack"})
110 + err := sess.Levels.Set(bcast.ChanId, bcast.TopLevel)
111 + if err != nil {
112 + sess.setState(Error)
113 + sess.Log.Errorf("unable to set level: %v", err)
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"})

« Back to merge proposal