Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ jobs:
uses: actions/setup-go@v4
with:
go-version: "1.21"
cache: false

- name: Install dependencies (Ubuntu)
if: matrix.os == 'linux'
run: |
Expand Down
2 changes: 1 addition & 1 deletion client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/sqlrsync/sqlrsync.com/sync"
)

var VERSION = "0.0.9"
var VERSION = "0.0.10"
var (
serverURL string
verbose bool
Expand Down
10 changes: 2 additions & 8 deletions client/remote/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,7 @@ func (c *Client) pingLoop() {
defer c.logger.Debug("Ping loop terminated")

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

// Use longer ping timeout in subscribe mode
pingTimeout := 10 * time.Second
if c.config.Subscribe {
pingTimeout = 30 * time.Second
}

err := conn.WriteControl(websocket.PingMessage, nil, time.Now().Add(pingTimeout))
err := conn.WriteControl(websocket.PingMessage, nil, time.Now().Add(5*time.Second))
if err != nil {
c.logger.Error("Failed to send ping", zap.Error(err))
c.setError(err)
Expand Down
Loading