Commit 10fc811
committed
memcached: call socket.recv multiple times to get all stats
New versions of memcached have more stats, making it more likely that stats
data will go across packet boundaries. Previously, this caused
the collector to crash on interpreting the resulting data, since some
stats lines would be truncated, and some stats would be missing
altogether.
This also explicitly closes the socket when finished, as well as sets a
timeout on reading from the socket so it won't hang around waiting
forever to receive data if something goes wrong.1 parent 175a4db commit 10fc811
1 file changed
+15
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
90 | 94 | | |
91 | 95 | | |
92 | | - | |
93 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
94 | 106 | | |
95 | 107 | | |
96 | 108 | | |
| 109 | + | |
97 | 110 | | |
98 | 111 | | |
99 | 112 | | |
| |||
0 commit comments