Commit f27475f2be8b427a0440d8f3d297e33f2d4015be
Catch error even more
cel committed on 4/15/2017, 3:31:56 AMParent: 430f06d7898e5850d1c1eaac6802a6fe97590c4f
Files changed
lib/server.js | changed |
lib/server.js | |||
---|---|---|---|
@@ -89,9 +89,15 @@ | |||
89 | 89 … | res.answer = []; | |
90 | 90 … | res.authority = []; | |
91 | 91 … | res.additional = []; | |
92 | 92 … | res.responseCode = 2; // SERVFAIL | |
93 | - res.end(); | ||
93 … | + try { | ||
94 … | + res.end(); | ||
95 … | + } catch(e) { | ||
96 … | + if (e && e.name !== 'This socket has been ended by the other party') { | ||
97 … | + console.error('error serving dns', e) | ||
98 … | + } | ||
99 … | + } | ||
94 | 100 … | } | |
95 | 101 … | }); | |
96 | 102 … | }; | |
97 | 103 … |
Built with git-ssb-web