File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
examples/simple_room_server Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -204,7 +204,10 @@ class MyMesh : public mesh::Mesh, public CommonCLICallbacks {
204204 void pushPostToClient (ClientInfo* client, PostInfo& post ) {
205205 int len = 0 ;
206206 memcpy (&reply_data[len], &post .post_timestamp , 4 ); len += 4 ; // this is a PAST timestamp... but should be accepted by client
207- reply_data[len++] = (TXT_TYPE_SIGNED_PLAIN << 2 ); // 'signed' plain text
207+
208+ uint8_t attempt;
209+ getRNG ()->random (&attempt, 1 ); // need this for re-tries, so packet hash (and ACK) will be different
210+ reply_data[len++] = (TXT_TYPE_SIGNED_PLAIN << 2 ) | (attempt & 3 ); // 'signed' plain text
208211
209212 // encode prefix of post.author.pub_key
210213 memcpy (&reply_data[len], post .author .pub_key , 4 ); len += 4 ; // just first 4 bytes
You can’t perform that action at this time.
0 commit comments