1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 06:39:22 +02:00

use newer api

This commit is contained in:
Nikolay Kim
2018-02-12 22:56:47 -08:00
parent a544034c06
commit b1eec3131f
9 changed files with 22 additions and 22 deletions

View File

@ -200,7 +200,7 @@ fn main() {
)))
.bind("127.0.0.1:59880").unwrap()
.start();
# actix::Arbiter::system().send(actix::msgs::SystemExit(0));
# actix::Arbiter::system().do_send(actix::msgs::SystemExit(0));
# let _ = sys.run();
}
```

View File

@ -24,7 +24,7 @@ fn main() {
.bind("127.0.0.1:59080").unwrap()
.start();
# actix::Arbiter::system().send(actix::msgs::SystemExit(0));
# actix::Arbiter::system().do_send(actix::msgs::SystemExit(0));
let _ = sys.run();
}
```
@ -52,7 +52,7 @@ use std::sync::mpsc;
fn main() {
let (tx, rx) = mpsc::channel();
thread::spawn(move || {
let sys = actix::System::new("http-server");
let addr = HttpServer::new(
@ -66,7 +66,7 @@ fn main() {
});
let addr = rx.recv().unwrap();
let _ = addr.call(
let _ = addr.send(
server::StopServer{graceful:true}).wait(); // <- Send `StopServer` message to server.
}
```

View File

@ -109,7 +109,7 @@ fn main() {
.start();
println!("Started http server: 127.0.0.1:8088");
# actix::Arbiter::system().send(actix::msgs::SystemExit(0));
# actix::Arbiter::system().do_send(actix::msgs::SystemExit(0));
let _ = sys.run();
}
```
@ -167,7 +167,7 @@ fn main() {
.start();
println!("Started http server: 127.0.0.1:8088");
# actix::Arbiter::system().send(actix::msgs::SystemExit(0));
# actix::Arbiter::system().do_send(actix::msgs::SystemExit(0));
let _ = sys.run();
}
```