increased timeout for Salto lock server connection to 40 seconds
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user