Commit 63f1173
committed
Never shrink configured read timeout during connect() setup
Address review feedback: connect() unconditionally set the setup-phase
read timeout to 10 s, even when getConfiguredReceiveTimeout() already
returned a larger value. That temporarily shrank the in-flight read
timeout during the openapi.json GET.
The worst case is the lazy-connect path inside commandPowerOn: power on
calls setReceiveTimeout(timeout) (typically 300 s by default), then
issues a PUT. If robot_api_version_ is still empty, put() lazy-calls
connect(), which would previously drop the 300 s back to 10 s for the
setup GET — exactly when the controller is booting and the GET most
needs the larger budget.
Treat the 10 s as a minimum-headroom for the setup GET, not a cap on
the caller's preferences: start from the configured value and only bump
up to 10 s if it is smaller. The save/restore around the GET still
honors whatever the caller had configured before connect() was entered.1 parent 241c1a2 commit 63f1173
1 file changed
Lines changed: 12 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
99 | 104 | | |
100 | | - | |
101 | | - | |
102 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
103 | 112 | | |
104 | 113 | | |
105 | 114 | | |
| |||
0 commit comments