Advertisement
Guest User

Untitled

a guest
Aug 21st, 2014
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. if (accept_threads > 0) {
  2. if (0 == na->do_listen(BLOCKING, opt.f_inbound_transparent)) {
  3.  
  4. for (int i=1; i < accept_threads; ++i) {
  5. NetAccept * a = na->clone();
  6.  
  7. snprintf(thr_name, MAX_THREAD_NAME_LENGTH, "[ACCEPT %d:%d]", i-1, ats_ip_port_host_order(&accept_ip));
  8. a->init_accept_loop(thr_name);
  9. Debug("iocore_net_accept", "Created accept thread #%d for port %d", i, ats_ip_port_host_order(&accept_ip));
  10. }
  11.  
  12. // Start the "template" accept thread last.
  13. Debug("iocore_net_accept", "Created accept thread #%d for port %d", accept_threads, ats_ip_port_host_order(&accept_ip));
  14. snprintf(thr_name, MAX_THREAD_NAME_LENGTH, "[ACCEPT %d:%d]", accept_threads-1, ats_ip_port_host_order(&accept_ip));
  15. na->init_accept_loop(thr_name);
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement