From 9f9d83f05853399c450013b2240e51974a2c784e Mon Sep 17 00:00:00 2001 From: Tobias Kammerer Date: Mon, 11 Sep 2023 12:47:40 +0200 Subject: [PATCH] formatting --- lib/stomp_handler.dart | 6 ++++-- test/stomp_handler_test.dart | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/stomp_handler.dart b/lib/stomp_handler.dart index 414a4b8..fa92eca 100644 --- a/lib/stomp_handler.dart +++ b/lib/stomp_handler.dart @@ -245,7 +245,8 @@ class StompHandler { _parser.escapeHeaders = false; } - if (frame.headers['version'] != '1.0' && frame.headers.containsKey('heart-beat')) { + if (frame.headers['version'] != '1.0' && + frame.headers.containsKey('heart-beat')) { _setupHeartbeat(frame); } @@ -301,7 +302,8 @@ class StompHandler { final ttl = max(config.heartbeatIncoming.inMilliseconds, serverOutgoing); _heartbeatReceiver?.cancel(); _heartbeatReceiver = Timer.periodic(Duration(milliseconds: ttl), (_) { - final deltaMs = DateTime.now().millisecondsSinceEpoch - _lastServerActivity.millisecondsSinceEpoch; + final deltaMs = DateTime.now().millisecondsSinceEpoch - + _lastServerActivity.millisecondsSinceEpoch; // The connection might be dead. Clean up. if (deltaMs > (ttl * 2)) { _cleanUp(); diff --git a/test/stomp_handler_test.dart b/test/stomp_handler_test.dart index 99c5b61..1a17a29 100644 --- a/test/stomp_handler_test.dart +++ b/test/stomp_handler_test.dart @@ -97,7 +97,8 @@ void main() { handler!.dispose(); }); - handler = StompHandler(config: config.copyWith(onConnect: onConnect))..start(); + handler = StompHandler(config: config.copyWith(onConnect: onConnect)) + ..start(); }); test('disconnects correctly', () async {