Skip to content

Commit 76be663

Browse files
author
Scott Powell
committed
* repeater: reduce FS writes on login
1 parent c215963 commit 76be663

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/simple_repeater/MyMesh.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ uint8_t MyMesh::handleLoginReq(const mesh::Identity& sender, const uint8_t* secr
115115
client->permissions |= perms;
116116
memcpy(client->shared_secret, secret, PUB_KEY_SIZE);
117117

118-
dirty_contacts_expiry = futureMillis(LAZY_CONTACTS_WRITE_DELAY);
118+
if (perms != PERM_ACL_GUEST) { // keep number of FS writes to a minimum
119+
dirty_contacts_expiry = futureMillis(LAZY_CONTACTS_WRITE_DELAY);
120+
}
119121
}
120122

121123
uint32_t now = getRTCClock()->getCurrentTimeUnique();

0 commit comments

Comments
 (0)