Commit 26d1d6e
committed
Fix server goroutine leak in forwardRequest: add handshake deadline
forwardRequest opens a stream to the destination and reads the
response. If the destination accepts but never responds, readObject
blocks forever — observed as 2.4K+ stuck goroutines per server,
growing rapidly after restart.
The idle timeout fix (PR skycoin#372) only covered the bridge phase
(CopyReadWriteCloser). This adds HandshakeTimeout to the
forwardRequest handshake read, matching the client-side behavior.1 parent e26b298 commit 26d1d6e
1 file changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
369 | 375 | | |
370 | 376 | | |
371 | 377 | | |
372 | 378 | | |
373 | 379 | | |
374 | 380 | | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
375 | 385 | | |
376 | 386 | | |
377 | 387 | | |
| |||
0 commit comments