mirror of https://github.com/fafhrd91/actix-net
fix build on windows
This commit is contained in:
parent
d6d7ed8061
commit
e1d24dd60d
|
@ -33,7 +33,7 @@ impl Signals {
|
||||||
{
|
{
|
||||||
actix_rt::spawn(Signals {
|
actix_rt::spawn(Signals {
|
||||||
srv,
|
srv,
|
||||||
stream: Box::pin(actix_rt::signal::ctrl_c()),
|
signals: Box::pin(actix_rt::signal::ctrl_c()),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
|
@ -75,7 +75,7 @@ impl Future for Signals {
|
||||||
|
|
||||||
fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
|
fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
|
||||||
#[cfg(not(unix))]
|
#[cfg(not(unix))]
|
||||||
match Pin::new(&mut self.stream).poll(cx) {
|
match self.signals.as_mut().poll(cx) {
|
||||||
Poll::Ready(_) => {
|
Poll::Ready(_) => {
|
||||||
self.srv.signal(Signal::Int);
|
self.srv.signal(Signal::Int);
|
||||||
Poll::Ready(())
|
Poll::Ready(())
|
||||||
|
|
Loading…
Reference in New Issue