mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-05-25 10:32:13 +00:00
remove useless mutext lock
This commit is contained in:
parent
f2b27e19f2
commit
09129639e1
1 changed files with 30 additions and 35 deletions
|
|
@ -4,7 +4,6 @@ import 'dart:io';
|
|||
import 'package:clock/clock.dart';
|
||||
import 'package:drift/drift.dart';
|
||||
import 'package:hashlib/random.dart';
|
||||
import 'package:mutex/mutex.dart';
|
||||
import 'package:twonly/globals.dart';
|
||||
import 'package:twonly/locator.dart';
|
||||
import 'package:twonly/src/database/daos/contacts.dao.dart';
|
||||
|
|
@ -36,10 +35,7 @@ import 'package:twonly/src/services/signal/session.signal.dart';
|
|||
import 'package:twonly/src/utils/log.dart';
|
||||
import 'package:twonly/src/utils/misc.dart';
|
||||
|
||||
final lockHandleServerMessage = Mutex();
|
||||
|
||||
Future<void> handleServerMessage(server.ServerToClient msg) async {
|
||||
return lockHandleServerMessage.protect(() async {
|
||||
Log.info('Processing a message from the server.');
|
||||
|
||||
/// Returns means, that the server can delete the message from the server.
|
||||
|
|
@ -77,7 +73,6 @@ Future<void> handleServerMessage(server.ServerToClient msg) async {
|
|||
await apiService.sendResponse(ClientToServer()..v0 = v0);
|
||||
AppState.gotMessageFromServer = true;
|
||||
Log.info('Message from server proccessed.');
|
||||
});
|
||||
}
|
||||
|
||||
DateTime lastPushKeyRequest = clock.now().subtract(const Duration(hours: 1));
|
||||
|
|
|
|||
Loading…
Reference in a new issue