NOT-OMEGA commited on
Commit
a59583d
Β·
verified Β·
1 Parent(s): 61467ce

Update main.cpp

Browse files
Files changed (1) hide show
  1. main.cpp +6 -6
main.cpp CHANGED
@@ -2,10 +2,10 @@
2
  * CollabDocs C++ β€” Main Server
3
  *
4
  * Stack:
5
- * Boost.Asio β€” async I/O
6
- * Boost.Beast β€” HTTP + WebSocket
7
- * nlohmann/json β€” JSON
8
- * C++17
9
  *
10
  * Each WebSocket connection gets its own session coroutine (stackful via
11
  * Boost.Asio's spawn/coroutine). All document mutations are protected by
@@ -515,7 +515,7 @@ void do_listen(asio::io_context& ioc, tcp::endpoint ep) {
515
 
516
  asio::spawn(ioc, [session](asio::yield_context y) {
517
  session->run(y);
518
- }, asio::detached);
519
  } else {
520
  // Plain HTTP
521
  auto res = handle_http(req);
@@ -526,7 +526,7 @@ void do_listen(asio::io_context& ioc, tcp::endpoint ep) {
526
  stream.socket().shutdown(tcp::socket::shutdown_send, ec2);
527
  }
528
  }
529
- }, asio::detached);
530
  }
531
  }
532
 
 
2
  * CollabDocs C++ β€” Main Server
3
  *
4
  * Stack:
5
+ * Boost.Asio β€” async I/O
6
+ * Boost.Beast β€” HTTP + WebSocket
7
+ * nlohmann/json β€” JSON
8
+ * C++17
9
  *
10
  * Each WebSocket connection gets its own session coroutine (stackful via
11
  * Boost.Asio's spawn/coroutine). All document mutations are protected by
 
515
 
516
  asio::spawn(ioc, [session](asio::yield_context y) {
517
  session->run(y);
518
+ });
519
  } else {
520
  // Plain HTTP
521
  auto res = handle_http(req);
 
526
  stream.socket().shutdown(tcp::socket::shutdown_send, ec2);
527
  }
528
  }
529
+ });
530
  }
531
  }
532