From 839e3fb887f3785b1411eb7aa3c69bd071d6295b Mon Sep 17 00:00:00 2001 From: Giovanni Barillari Date: Mon, 18 Apr 2022 23:04:58 +0200 Subject: [PATCH] fix TCPListener load on windows --- src/workers.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/workers.rs b/src/workers.rs index 113edb07..10e2ac7a 100644 --- a/src/workers.rs +++ b/src/workers.rs @@ -3,7 +3,7 @@ use std::net::TcpListener; #[cfg(unix)] use std::os::unix::io::FromRawFd; #[cfg(windows)] -use std::os::windows::io::{FromRawSocket, RawSocket}; +use std::os::windows::io::FromRawSocket; use super::asgi::serve::ASGIWorker; use super::rsgi::serve::RSGIWorker; @@ -40,7 +40,7 @@ impl WorkerConfig { #[cfg(windows)] pub fn tcp_listener(&self) -> TcpListener { unsafe { - TcpListener::from_raw_socket(self.socket_fd) + TcpListener::from_raw_socket(self.socket_fd as u64) } } }