summaryrefslogtreecommitdiff
path: root/samples/echobot-webhook-server
diff options
context:
space:
mode:
authorOleg Morozenkov <m@oleg.rocks>2018-07-26 00:03:15 +0300
committerOleg Morozenkov <m@oleg.rocks>2018-07-26 00:03:15 +0300
commit2234450b81e3451a3e14686e80e13e66cf6d2a4a (patch)
tree1eeda88af36566425621c34092df9e63b5749037 /samples/echobot-webhook-server
parent399eb75d2af1e641fd80b25d1729ef250a66314a (diff)
Test on old ubuntu
Diffstat (limited to 'samples/echobot-webhook-server')
-rw-r--r--samples/echobot-webhook-server/src/main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/samples/echobot-webhook-server/src/main.cpp b/samples/echobot-webhook-server/src/main.cpp
index 7b5776a..d51246d 100644
--- a/samples/echobot-webhook-server/src/main.cpp
+++ b/samples/echobot-webhook-server/src/main.cpp
@@ -26,6 +26,11 @@ int main() {
bot.getApi().sendMessage(message->chat->id, "Your message is: " + message->text);
});
+ signal(SIGINT, [](int s) {
+ printf("SIGINT got\n");
+ exit(0);
+ });
+
try {
printf("Bot username: %s\n", bot.getApi().getMe()->username.c_str());