Skip to content

Replace TimerTask with ScheduledExecutorService#878

Merged
marci4 merged 5 commits into
TooTallNate:masterfrom
ItsHarper:use-scheduledthreadexecutor
Apr 23, 2019
Merged

Replace TimerTask with ScheduledExecutorService#878
marci4 merged 5 commits into
TooTallNate:masterfrom
ItsHarper:use-scheduledthreadexecutor

Conversation

@ItsHarper

Copy link
Copy Markdown

Description

By getting rid of TimerTask, we remove an assumption that the system clock will not be modified.

Related Issue

Fixes #869

How Has This Been Tested?

Observed that there is no longer an issue when the system time is changed.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed (aside from the ones that previously failed).

@marci4 marci4 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rest looks good!

@@ -0,0 +1,47 @@
/*

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please use the license provided in https://github.com/TooTallNate/Java-WebSocket/blob/master/LICENSE

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@marci4 marci4 added this to the Release 1.4.1 milestone Apr 14, 2019
@ItsHarper

Copy link
Copy Markdown
Author

Ready for re-review

@marci4 marci4 merged commit 73c6805 into TooTallNate:master Apr 23, 2019
@ItsHarper ItsHarper deleted the use-scheduledthreadexecutor branch April 23, 2019 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lost connection detection is sensitive to changes in system time

2 participants