Skip to content

Commit

Permalink
graceful shutdown and clean up of server after 5 requests
Browse files Browse the repository at this point in the history
  • Loading branch information
dhanushrajgp committed Jul 13, 2024
1 parent 7692e4b commit 145712d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fn main() {
let listener = TcpListener::bind("127.0.0.1:7878").unwrap();
let pool = ThreadPool::new(4);

for stream in listener.incoming().take(2) {
for stream in listener.incoming().take(5) {
let stream = stream.unwrap();

pool.execute(|| {
Expand Down

0 comments on commit 145712d

Please sign in to comment.