Handling Ctrl-C in a warp server

Hi there!

Following standard examples from warp repo, I don't see how to handle Ctrl-C to stop the server gracefully.

Like this: warp/hello.rs at master · seanmonstar/warp · GitHub

How do I use ctrlc crate to handle Ctrl-C gracefully?

Maybe Tokio's signal module works for you?

1 Like

Can I hug you? :smiley: Thank you again for your help :smiley:

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.