Fix std.net.connectUnixSocket in evented I/O mode

The event loop constant was missing.
This commit is contained in:
heidezomp 2020-10-19 23:18:21 +02:00 committed by Andrew Kelley
parent ce5035c07d
commit 1e07487904

View File

@ -615,6 +615,7 @@ pub fn connectUnixSocket(path: []const u8) !fs.File {
var addr = try std.net.Address.initUnix(path);
if (std.io.is_async) {
const loop = std.event.Loop.instance orelse return error.WouldBlock;
try loop.connect(sockfd, &addr.any, addr.getOsSockLen());
} else {
try os.connect(sockfd, &addr.any, addr.getOsSockLen());