Skip to content

Commit

Permalink
Modified connection delays
Browse files Browse the repository at this point in the history
- Modified on start connection check to take progressively longer between
  failures.
    - First Attempt will wait 100ms, second attempt 200ms and so on for 100
      attempts.
    - Done in response to a slow container startups causing the plugin not to
      function until it is manually disabled and reenabled.
- Modified MAJOR and PRE Changelogs as needed.
  • Loading branch information
CEKlopfenstein committed Aug 21, 2024
1 parent 2d94644 commit 60cd255
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 42 deletions.
26 changes: 3 additions & 23 deletions MAJOR_CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,8 @@
### No Changes From 2024.2.36
2024.3.2 is a rebuild to support Gotify 2.5.0. No Changes beyond that.

### General Improvements
- Modified method of setting version number. Now provided at compile time through ldflags
- Built and tested basic Release Generation Pipelines for both Prereleases and Proper releases.
- Discord Webhooks how hidden unless hovered over.
- Refactored internal package names for clarity.
- Version of the change log is now present within the Plugin Info Page.
- Limited to changes since last non prerelease. (Contents of MAJOR_CHANGELOG.md in repo)
- Updated README.md
- Removed certain planned features.
- Delay between attempted connections on enable now progressively increases.
- Done to correct issue where it fails on a slow starting container. (Exceeded 10 seconds)
- Got to love power outages causing frequent reboots for finding this issue.

### Bug Fixes
- Added block to prevent spamming out transmittions that include blank titles and messages.
- Corrected reconnect protocal to function as expected.
- Broken connections will not be reestablished until 1 second after connection was lost.

### New Features
- Added ability to have transmit counts.
- Updated within the GUI once every 5 seconds currently.
- Logs for the plugin spesifically are now visible within the UI.
- Refreshes every 5 seconds
- Implemented New Relay Transmitters.
- Discord Advance
- Makes use of Embed elements in Discord messages.
- Currently provides limited benefit over normal Discord Transmitter.
- Pushbullet
19 changes: 1 addition & 18 deletions PRE_CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,2 @@
### Changes:
- Added block to prevent spamming out transmittions that include blank titles and messages.
- Corrected reconnect protocal to function as expected.
- Broken connections will not be reestablished until 1 second after connection was lost.
- Refactored internal package names for clarity.
- Version of the change log is now present within the Plugin Info Page.
- Limited to changes since last non prerelease. (Contents of MAJOR_CHANGELOG.md in repo)
- Discord Webhooks how hidden unless hovered over.
- Added ability to have transmit counts.
- Updated within the GUI once every 5 seconds currently.
- Logs for the plugin spesifically are now visible within the UI.
- Refreshes every 5 seconds
- Implemented New Relay Transmitters.
- Discord Advance
- Makes use of Embed elements in Discord messages.
- Currently provides limited benefit over normal Discord Transmitter.
- Pushbullet
- Updated README.md
- Removed certain planned features.
- Delay between attempted connections on enable now progressively increases.
4 changes: 3 additions & 1 deletion relay/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ func (relay *Relay) Start() {
if attemptTick >= attemptLimit {
relay.logger.Printf("%s Limit Exceeded for checking HTTP(s) status\n", relay.userName)
return
}else{
relay.logger.Printf("%s Checking HTTP(s) Status in %dms", relay.userName, (100 * (2+attemptTick)))
}
time.Sleep(100 * time.Millisecond)
time.Sleep(time.Duration(100 * (attemptTick+2)) * time.Millisecond)
attemptTick++
_, check := relay.gotifyApi.GetServerInfo()
if check == nil {
Expand Down

0 comments on commit 60cd255

Please sign in to comment.