-
Notifications
You must be signed in to change notification settings - Fork 201
Commit a4d3f30
authored
Fix socket timeouts (#1227)
## Fix connection hint timeout
The driver may receive a configuration hint from the server during connection
setup. The hint is a timeout: if the driver is waiting for a response from the
server but has not heard back within the timeout window, the driver shall assume
the connection is dead. The server can send `NOOP` ping messages to reset the
timer ticking on the client-side.
The driver applied this hint to both reads and writes. This PR changes it so
that the hint, as intended, only applies to read operations on connections.
## New write timeout configuraiton option
To avoid the driver hanging indefinitely on write operations, a new driver-level
configuration option `connection_write_timeout`, which defaults to `30 seconds`
is introduced. As the name suggests, this timeout is applied to all write
operations on connections.1 parent 134be3e commit a4d3f30
File tree
57 files changed
+593
-237
lines changed- docs/source
- src/neo4j
- _async_compat/network
- _async
- io
- _io
- _sync
- io
- tests/unit
- async_
- fixtures
- io
- fixtures
- mixed/async_compat
- sync
- fixtures
- io
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
57 files changed
+593
-237
lines changedLines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
190 | 190 |
| |
191 | 191 |
| |
192 | 192 |
| |
193 | + | ||
194 | + | ||
195 | + | ||
193 | 196 |
| |
194 | 197 |
| |
195 | 198 |
| |
|
Lines changed: 12 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
399 | 399 |
| |
400 | 400 |
| |
401 | 401 |
| |
402 | + | ||
402 | 403 |
| |
403 | 404 |
| |
404 | 405 |
| |
| |||
430 | 431 |
| |
431 | 432 |
| |
432 | 433 |
| |
433 | - | ||
434 | + | ||
434 | 435 |
| |
435 | 436 |
| |
436 | 437 |
| |
| |||
450 | 451 |
| |
451 | 452 |
| |
452 | 453 |
| |
454 | + | ||
455 | + | ||
456 | + | ||
457 | + | ||
458 | + | ||
459 | + | ||
460 | + | ||
461 | + | ||
462 | + | ||
463 | + | ||
453 | 464 |
| |
454 | 465 |
| |
455 | 466 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
54 | 54 |
| |
55 | 55 |
| |
56 | 56 |
| |
57 | + | ||
58 | + | ||
59 | + | ||
60 | + | ||
57 | 61 |
| |
58 | 62 |
| |
59 | 63 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
127 | 127 |
| |
128 | 128 |
| |
129 | 129 |
| |
130 | + | ||
130 | 131 |
| |
131 | 132 |
| |
132 | 133 |
| |
|
Lines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
418 | 418 |
| |
419 | 419 |
| |
420 | 420 |
| |
421 | - | ||
421 | + | ||
422 | + | ||
422 | 423 |
| |
423 | 424 |
| |
424 | 425 |
| |
425 | - | ||
426 | + | ||
427 | + | ||
426 | 428 |
| |
427 | 429 |
| |
428 | 430 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
626 | 626 |
| |
627 | 627 |
| |
628 | 628 |
| |
629 | - | ||
629 | + | ||
630 | 630 |
| |
631 | 631 |
| |
632 | 632 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
149 | 149 |
| |
150 | 150 |
| |
151 | 151 |
| |
152 | - | ||
152 | + | ||
153 | 153 |
| |
154 | 154 |
| |
155 | 155 |
| |
| |||
622 | 622 |
| |
623 | 623 |
| |
624 | 624 |
| |
625 | - | ||
625 | + | ||
626 | 626 |
| |
627 | 627 |
| |
628 | 628 |
| |
| |||
708 | 708 |
| |
709 | 709 |
| |
710 | 710 |
| |
711 | - | ||
711 | + | ||
712 | 712 |
| |
713 | 713 |
| |
714 | 714 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
158 | 158 |
| |
159 | 159 |
| |
160 | 160 |
| |
161 | - | ||
161 | + | ||
162 | 162 |
| |
163 | 163 |
| |
164 | 164 |
| |
|
Lines changed: 13 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
32 | 32 |
| |
33 | 33 |
| |
34 | 34 |
| |
35 | - | ||
35 | + | ||
36 | + | ||
37 | + | ||
38 | + | ||
36 | 39 |
| |
37 | 40 |
| |
38 | 41 |
| |
| |||
157 | 160 |
| |
158 | 161 |
| |
159 | 162 |
| |
160 | - | ||
161 | - | ||
163 | + | ||
164 | + | ||
162 | 165 |
| |
163 | 166 |
| |
164 | 167 |
| |
| |||
168 | 171 |
| |
169 | 172 |
| |
170 | 173 |
| |
171 | - | ||
174 | + | ||
172 | 175 |
| |
173 | 176 |
| |
174 | 177 |
| |
| |||
192 | 195 |
| |
193 | 196 |
| |
194 | 197 |
| |
195 | - | ||
196 | - | ||
197 | - | ||
198 | + | ||
199 | + | ||
200 | + | ||
201 | + | ||
202 | + | ||
198 | 203 |
| |
199 | 204 |
| |
200 | 205 |
| |
| |||
203 | 208 |
| |
204 | 209 |
| |
205 | 210 |
| |
206 | - | ||
211 | + | ||
207 | 212 |
| |
208 | 213 |
| |
209 | 214 |
| |
|
0 commit comments