Skip to content

Commit 00f716d

Browse files
authored
Merge pull request #36 from sqlrsync/v0.0.10
v0.0.10 - a maintenance release that should reduce noisy logs during PUSH/PULL --subscription * Slight tweak to build process * Adjust websocket timeouts to be more sane
2 parents 865dcd5 + 84d1787 commit 00f716d

3 files changed

Lines changed: 5 additions & 9 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ jobs:
4949
uses: actions/setup-go@v4
5050
with:
5151
go-version: "1.21"
52+
cache: false
53+
5254
- name: Install dependencies (Ubuntu)
5355
if: matrix.os == 'linux'
5456
run: |

client/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"github.com/sqlrsync/sqlrsync.com/sync"
1616
)
1717

18-
var VERSION = "0.0.9"
18+
var VERSION = "0.0.10"
1919
var (
2020
serverURL string
2121
verbose bool

client/remote/client.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,7 @@ func (c *Client) pingLoop() {
11411141
defer c.logger.Debug("Ping loop terminated")
11421142

11431143
// Use longer ping interval in subscribe mode to accommodate hibernated connections
1144-
pingInterval := 5 * time.Second
1144+
pingInterval := 4 * time.Minute
11451145
if c.config.Subscribe {
11461146
pingInterval = 25 * time.Minute
11471147
c.logger.Info("Subscribe mode: using 25-minute ping interval for hibernated connections")
@@ -1173,13 +1173,7 @@ func (c *Client) pingLoop() {
11731173
return
11741174
}
11751175

1176-
// Use longer ping timeout in subscribe mode
1177-
pingTimeout := 10 * time.Second
1178-
if c.config.Subscribe {
1179-
pingTimeout = 30 * time.Second
1180-
}
1181-
1182-
err := conn.WriteControl(websocket.PingMessage, nil, time.Now().Add(pingTimeout))
1176+
err := conn.WriteControl(websocket.PingMessage, nil, time.Now().Add(5*time.Second))
11831177
if err != nil {
11841178
c.logger.Error("Failed to send ping", zap.Error(err))
11851179
c.setError(err)

0 commit comments

Comments
 (0)