Commit bbcd132
committed
Add timeout to connection.Connect()
If connection.Connect() gets stuck it will block infinitely, never
reporting an error to the library's consumer.
We have received reports of this happening even when a _valid_ address
is passed in node-driver-registrar because of a race condition involving
pod restarts. Specifically, there is an unlucky sequence of events when
restarting both the CSI Driver and node-driver-registrar, wheere the
node-driver-registar will attempt to Connect() to the CSI Driver, but
will get stuck doing so on an old file descriptor from the previously
running CSI Driver (and thus, get stuck infinitely).
There is no mechanism to pass a connection timeout to Connect, so this
commit adds a reasonbly long default timeout so these cases will
eventually return an error rather than getting stuck infinitely.
Signed-off-by: Connor Catlett <conncatl@amazon.com>1 parent 597d128 commit bbcd132
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
| 57 | + | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
0 commit comments