hyperium/hyper — pull request #204 by aatxe (2014-12-21 21:28:02+00:00)
Title: Server programs no longer exit immediately.

This change works by holding the JoinGuard inside of the Listening object produced by Server::listen(...). It's interesting to note the following behaviors:

The following prints the listening line and explicitly waits while the server is open.
```rust
fn main() {
let server = Server::http(Ipv4Addr(127, 0, 0, 1), 1337);
let mut listening = server.listen(echo).unwrap();
println!("Listening on http://127.0.0.1:1337");
listening.await();
}
```

The following prints the listening line and implicitly waits while the server is open.
```rust
fn main() {
let server = Server::http(Ipv4Addr(127, 0, 0, 1), 1337);
let listening = server.listen(echo).unwrap();
println!("Listening on http://127.0.0.1:1337");
// note, await is omitted, but the result of listen is named.
}
```

Both of the following exit immediately (for the same reason).
```rust
fn main() {
let server = Server::http(Ipv4Addr(127, 0, 0, 1), 1337);
let _ = server.listen(echo).unwrap();
println!("Listening on http://127.0.0.1:1337");
}
```

```rust
fn main() {
let server = Server::http(Ipv4Addr(127, 0, 0, 1), 1337);
server.listen(echo).unwrap();
println!("Listening on http://127.0.0.1:1337");
}
```