Commit 9095fe8
committed
Fix stale socket recovery without connect probe in client
Move stale socket detection to the daemon's bind() path: on EADDRINUSE,
probe with connect() to check if a real daemon is listening. If
ECONNREFUSED (stale socket from crash), unlink and retry bind. This
avoids the client's connect probe which creates a real connection the
daemon must accept and handle.1 parent b1acd06 commit 9095fe8
2 files changed
+29
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1246 | 1246 | | |
1247 | 1247 | | |
1248 | 1248 | | |
1249 | | - | |
1250 | | - | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
1251 | 1255 | | |
1252 | 1256 | | |
1253 | | - | |
1254 | | - | |
1255 | | - | |
1256 | | - | |
1257 | | - | |
1258 | | - | |
1259 | | - | |
1260 | | - | |
1261 | | - | |
1262 | | - | |
1263 | | - | |
1264 | | - | |
1265 | | - | |
1266 | | - | |
1267 | | - | |
1268 | | - | |
1269 | | - | |
1270 | | - | |
1271 | | - | |
1272 | | - | |
1273 | | - | |
| 1257 | + | |
1274 | 1258 | | |
1275 | 1259 | | |
1276 | 1260 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1787 | 1787 | | |
1788 | 1788 | | |
1789 | 1789 | | |
1790 | | - | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
1791 | 1810 | | |
1792 | | - | |
| 1811 | + | |
1793 | 1812 | | |
1794 | 1813 | | |
1795 | 1814 | | |
1796 | 1815 | | |
1797 | 1816 | | |
| 1817 | + | |
1798 | 1818 | | |
1799 | 1819 | | |
1800 | 1820 | | |
| |||
0 commit comments