mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
net compatibility improvements (#14933)
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
This commit is contained in:
@@ -524,7 +524,8 @@ public:
|
||||
|
||||
/* Listen to port using this HttpContext */
|
||||
us_listen_socket_t *listen(const char *host, int port, int options) {
|
||||
auto socket = us_socket_context_listen(SSL, getSocketContext(), host, port, options, sizeof(HttpResponseData<SSL>));
|
||||
int error = 0;
|
||||
auto socket = us_socket_context_listen(SSL, getSocketContext(), host, port, options, sizeof(HttpResponseData<SSL>), &error);
|
||||
// we dont depend on libuv ref for keeping it alive
|
||||
if (socket) {
|
||||
us_socket_unref(&socket->s);
|
||||
@@ -534,7 +535,8 @@ public:
|
||||
|
||||
/* Listen to unix domain socket using this HttpContext */
|
||||
us_listen_socket_t *listen_unix(const char *path, size_t pathlen, int options) {
|
||||
auto* socket = us_socket_context_listen_unix(SSL, getSocketContext(), path, pathlen, options, sizeof(HttpResponseData<SSL>));
|
||||
int error = 0;
|
||||
auto* socket = us_socket_context_listen_unix(SSL, getSocketContext(), path, pathlen, options, sizeof(HttpResponseData<SSL>), &error);
|
||||
// we dont depend on libuv ref for keeping it alive
|
||||
if (socket) {
|
||||
us_socket_unref(&socket->s);
|
||||
|
||||
Reference in New Issue
Block a user