Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 24 additions & 9 deletions lib/src/frame_cryptor_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ class KeyProviderImpl implements KeyProvider {
logger.fine('waiting for init on msg: $msgId');
return event.msgId == msgId;
},
duration: Duration(seconds: 15),
duration: Duration(seconds: 5),
onTimeout: () => throw Exception('waiting for init on msg timed out'),
);
}

Expand All @@ -168,7 +169,8 @@ class KeyProviderImpl implements KeyProvider {
logger.fine('waiting for dispose on msg: $msgId');
return event.msgId == msgId;
},
duration: Duration(seconds: 15),
duration: Duration(seconds: 5),
onTimeout: () => throw Exception('waiting for dispose on msg timed out'),
);

_keys.clear();
Expand Down Expand Up @@ -197,7 +199,8 @@ class KeyProviderImpl implements KeyProvider {
logger.fine('waiting for setKey on msg: $msgId');
return event.msgId == msgId;
},
duration: Duration(minutes: 15),
duration: Duration(seconds: 5),
onTimeout: () => throw Exception('waiting for setKey on msg timed out'),
);

_keys[participantId] ??= [];
Expand Down Expand Up @@ -230,7 +233,9 @@ class KeyProviderImpl implements KeyProvider {
logger.fine('waiting for ratchetKey on msg: $msgId');
return event.msgId == msgId;
},
duration: Duration(seconds: 15),
duration: Duration(seconds: 5),
onTimeout: () =>
throw Exception('waiting for ratchetKey on msg timed out'),
);

return base64Decode(res.data['newKey']);
Expand All @@ -257,7 +262,9 @@ class KeyProviderImpl implements KeyProvider {
logger.fine('waiting for exportKey on msg: $msgId');
return event.msgId == msgId;
},
duration: Duration(seconds: 15),
duration: Duration(seconds: 5),
onTimeout: () =>
throw Exception('waiting for exportKey on msg timed out'),
);

return base64Decode(res.data['exportedKey']);
Expand All @@ -280,7 +287,9 @@ class KeyProviderImpl implements KeyProvider {
logger.fine('waiting for exportSharedKey on msg: $msgId');
return event.msgId == msgId;
},
duration: Duration(seconds: 15),
duration: Duration(seconds: 5),
onTimeout: () =>
throw Exception('waiting for exportSharedKey on msg timed out'),
);

return base64Decode(res.data['exportedKey']);
Expand All @@ -302,7 +311,9 @@ class KeyProviderImpl implements KeyProvider {
logger.fine('waiting for ratchetSharedKey on msg: $msgId');
return event.msgId == msgId;
},
duration: Duration(seconds: 15),
duration: Duration(seconds: 5),
onTimeout: () =>
throw Exception('waiting for ratchetSharedKey on msg timed out'),
);

return base64Decode(res.data['newKey']);
Expand All @@ -326,7 +337,9 @@ class KeyProviderImpl implements KeyProvider {
logger.fine('waiting for setSharedKey on msg: $msgId');
return event.msgId == msgId;
},
duration: Duration(seconds: 15),
duration: Duration(seconds: 5),
onTimeout: () =>
throw Exception('waiting for setSharedKey on msg timed out'),
);
}

Expand All @@ -347,7 +360,9 @@ class KeyProviderImpl implements KeyProvider {
logger.fine('waiting for setSifTrailer on msg: $msgId');
return event.msgId == msgId;
},
duration: Duration(seconds: 15),
duration: Duration(seconds: 5),
onTimeout: () =>
throw Exception('waiting for setSifTrailer on msg timed out'),
);
}
}
Expand Down