Skip to content

Commit

Permalink
fix TCPListener load on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
gi0baro committed Apr 18, 2022
1 parent 052d8f3 commit 839e3fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/workers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
}
}
}
Expand Down

0 comments on commit 839e3fb

Please sign in to comment.