-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src: port Pipe to uv_pipe_bind2, uv_pipe_connect2
The introduction of the uv_pipe_bind2 and uv_pipe_connect2 methods in libuv v1.46.0 changed the behaviour of uv_pipe_bind and uv_pipe_connect. This broke the ability to connect to abstract domain sockets on linux. This change ports PipeWrap to use the new uv_pipe_bind2 and uv_pipe_connect2 methods to restore abstract domain socket support. Fixes: #49656 Refs: libuv/libuv#4030 PR-URL: #49667 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
- Loading branch information
Showing
2 changed files
with
34 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
'use strict'; | ||
const common = require('../common'); | ||
const assert = require('assert'); | ||
const http = require('http'); | ||
|
||
if (!common.isLinux) common.skip(); | ||
|
||
const server = http.createServer( | ||
common.mustCall((req, res) => { | ||
res.end('ok'); | ||
}) | ||
); | ||
|
||
server.listen( | ||
'\0abstract', | ||
common.mustCall(() => { | ||
http.get( | ||
{ | ||
socketPath: server.address(), | ||
}, | ||
common.mustCall((res) => { | ||
assert.strictEqual(res.statusCode, 200); | ||
server.close(); | ||
}) | ||
); | ||
}) | ||
); |