mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-08-01 08:05:55 +10:00
Refactor timeout calculations for repeater and login frames to ensure minimum message size is respected; remove obsolete widget test file.
This commit is contained in:
@@ -91,9 +91,12 @@ class _RoomLoginDialogState extends State<RoomLoginDialog> {
|
||||
final selection = await _connector.preparePathForContactSend(room);
|
||||
final loginFrame = buildSendLoginFrame(room.publicKey, password);
|
||||
final pathLengthValue = selection.useFlood ? -1 : selection.hopCount;
|
||||
final responseBytes = loginFrame.length > maxFrameSize
|
||||
? loginFrame.length
|
||||
: maxFrameSize;
|
||||
final timeoutMs = _connector.calculateTimeout(
|
||||
pathLength: pathLengthValue,
|
||||
messageBytes: loginFrame.length,
|
||||
messageBytes: responseBytes,
|
||||
);
|
||||
final timeoutSeconds = (timeoutMs / 1000).ceil();
|
||||
final timeout = Duration(milliseconds: timeoutMs);
|
||||
|
||||
Reference in New Issue
Block a user