Skip to content

Commit b98fc75

Browse files
author
Aidan Lee
committed
Fix dodgy pointer reinterpreting
1 parent 1955edc commit b98fc75

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/hx/libs/asys/libuv/net/LibuvTcpServer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ void hx::asys::net::TcpServer_obj::open_ipv4(Context ctx, const String host, int
373373
return;
374374
}
375375

376-
callbacks->succeed(new hx::asys::libuv::net::LibuvTcpServer(new hx::asys::libuv::net::LibuvTcpServer::Ctx(std::move(tcp)), local));
376+
callbacks->succeed(hx::asys::net::TcpServer(new hx::asys::libuv::net::LibuvTcpServer(new hx::asys::libuv::net::LibuvTcpServer::Ctx(std::move(tcp)), local)));
377377
}
378378
};
379379

src/hx/libs/asys/libuv/net/LibuvTcpSocket.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ namespace
5252
return;
5353
}
5454

55-
request->callbacks->succeed(new hx::asys::libuv::net::LibuvTcpSocket(request->ctx.release(), local, remote));
55+
request->callbacks->succeed(hx::asys::net::TcpSocket(new hx::asys::libuv::net::LibuvTcpSocket(request->ctx.release(), local, remote)));
5656
}
5757
};
5858

@@ -327,7 +327,7 @@ void hx::asys::net::TcpSocket_obj::connect_ipv4(Context ctx, const String host,
327327
}
328328
};
329329

330-
auto keepAlive = std::optional<int>();
330+
auto keepAlive = std::optional<int>();
331331
auto sendBuffer = std::optional<int>();
332332
auto recvBuffer = std::optional<int>();
333333

0 commit comments

Comments
 (0)