isc_uv_import must pass UV__IPC_SOCKET_XFER_TCP_CONNECTION, not SERVER.
As a leftover from old TCP accept code isc_uv_import passed TCP_SERVER
flag when importing a socket on Windows.
Since now we're importing/exporting accepted connections it needs to
pass TCP_CONNECTION flag.
(cherry picked from commit 801f7af6e9)
This commit is contained in:
committed by
Ondřej Surý
parent
4b9e317561
commit
091117b7ae
@@ -72,6 +72,7 @@ isc_uv_export(uv_stream_t *stream, isc_uv_stream_info_t *info) {
|
||||
if (xfer_info.delayed_error != 0) {
|
||||
return (xfer_info.delayed_error);
|
||||
}
|
||||
INSIST(xfer_type == UV__IPC_SOCKET_XFER_TCP_CONNECTION);
|
||||
info->type = UV_TCP;
|
||||
info->socket_info = xfer_info.socket_info;
|
||||
return (0);
|
||||
@@ -84,7 +85,7 @@ isc_uv_import(uv_stream_t *stream, isc_uv_stream_info_t *info) {
|
||||
}
|
||||
|
||||
return (uv__tcp_xfer_import(
|
||||
(uv_tcp_t *)stream, UV__IPC_SOCKET_XFER_TCP_SERVER,
|
||||
(uv_tcp_t *)stream, UV__IPC_SOCKET_XFER_TCP_CONNECTION,
|
||||
&(uv__ipc_socket_xfer_info_t){
|
||||
.socket_info = info->socket_info }));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user