increased timeout for Salto lock server connection to 40 seconds
This commit is contained in:
parent
04c664294d
commit
c15ceba78f
@ -140,7 +140,7 @@ func (lock *SaltoLockServer) waitForAck(conn net.Conn, reader *bufio.Reader, tim
|
|||||||
|
|
||||||
// LockSequence performs the full ENQ/ACK handshake and command exchange
|
// LockSequence performs the full ENQ/ACK handshake and command exchange
|
||||||
func (lock *SaltoLockServer) LockSequence() error {
|
func (lock *SaltoLockServer) LockSequence() error {
|
||||||
const timeout = 10 * time.Second
|
const timeout = 20 * time.Second
|
||||||
var (
|
var (
|
||||||
resp []byte
|
resp []byte
|
||||||
drained = 0 // count of stale frames consumed across waits
|
drained = 0 // count of stale frames consumed across waits
|
||||||
@ -178,7 +178,7 @@ func (lock *SaltoLockServer) LockSequence() error {
|
|||||||
|
|
||||||
// 5. Now read the *next* STX frame which should be the response to our command.
|
// 5. Now read the *next* STX frame which should be the response to our command.
|
||||||
for {
|
for {
|
||||||
conn.SetReadDeadline(time.Now().Add(20 * time.Second))
|
conn.SetReadDeadline(time.Now().Add(40 * time.Second))
|
||||||
b, e := reader.ReadByte()
|
b, e := reader.ReadByte()
|
||||||
if e != nil {
|
if e != nil {
|
||||||
return fmt.Errorf("error reading response start: %w", e)
|
return fmt.Errorf("error reading response start: %w", e)
|
||||||
|
|||||||
2
main.go
2
main.go
@ -29,7 +29,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
buildVersion = "1.0.20"
|
buildVersion = "1.0.21"
|
||||||
serviceName = "hardlink"
|
serviceName = "hardlink"
|
||||||
customLayout = "2006-01-02 15:04:05 -0700"
|
customLayout = "2006-01-02 15:04:05 -0700"
|
||||||
transactionUrl = "http://127.0.0.1:18181/start-transaction/"
|
transactionUrl = "http://127.0.0.1:18181/start-transaction/"
|
||||||
|
|||||||
@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
builtVersion is a const in main.go
|
builtVersion is a const in main.go
|
||||||
|
|
||||||
|
#### 1.0.21 - 20 October 2025
|
||||||
|
increased timeout for Salto lock server connection to 40 seconds
|
||||||
|
|
||||||
#### 1.0.20 - 06 October 2025
|
#### 1.0.20 - 06 October 2025
|
||||||
removed minutes from the start and expiry time in Salto lock command
|
removed minutes from the start and expiry time in Salto lock command
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user