increased timeout for Salto lock server connection to 40 seconds

This commit is contained in:
2025-10-20 19:41:07 +02:00
parent 04c664294d
commit c15ceba78f
3 changed files with 6 additions and 3 deletions
+2 -2
View File
@@ -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
func (lock *SaltoLockServer) LockSequence() error {
const timeout = 10 * time.Second
const timeout = 20 * time.Second
var (
resp []byte
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.
for {
conn.SetReadDeadline(time.Now().Add(20 * time.Second))
conn.SetReadDeadline(time.Now().Add(40 * time.Second))
b, e := reader.ReadByte()
if e != nil {
return fmt.Errorf("error reading response start: %w", e)