Skip to content

Commit

Permalink
fix timeout interval comparing microseconds to milliseconds (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjansen4857 authored Dec 22, 2023
1 parent 005aa7e commit 75f1f42
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.3.1

- Fix connections being timed out too quickly

## 1.3.0

- Added ability to retrieve cached values
Expand Down
2 changes: 1 addition & 1 deletion lib/src/nt4_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ class NT4Client {

int currentTime = _getClientTimeUS();

if (currentTime - _lastReceivedTime > _timeoutInterval) {
if (currentTime - _lastReceivedTime > _timeoutInterval * 1000) {
_wsOnClose();
}
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: nt4
description: Dart implementation of the WPILib NT4 protocol
version: 1.3.0
version: 1.3.1
repository: https://github.com/mjansen4857/nt4

environment:
Expand Down

0 comments on commit 75f1f42

Please sign in to comment.