Modify

Ticket #7488 (closed Bugs: fixed)

Opened 19 months ago

Last modified 16 months ago

Accept Errors

Reported by: Olaf van der Spek <olafvdspek@…> Owned by: chris_kohlhoff
Milestone: To Be Determined Component: asio
Version: Boost 1.51.0 Severity: Problem
Keywords: Cc:

Description

If an error occurs, the server stops accepting new connections. I think this was reported before (for another example) and I think other examples also suffer from it.

boost_asio/example/local/stream_server.cpp

  void handle_accept(session_ptr new_session,
      const boost::system::error_code& error)
  {
    if (!error)
    {
      new_session->start();
      new_session.reset(new session(io_service_));
      acceptor_.async_accept(new_session->socket(),
          boost::bind(&server::handle_accept, this, new_session,
            boost::asio::placeholders::error));
    }
  }

Attachments

Change History

comment:1 Changed 16 months ago by chris_kohlhoff

  • Status changed from new to closed
  • Resolution set to fixed

(In [82290]) Merge from trunk:

  • Fix some 64-to-32-bit conversion warnings. Fixes #7459
  • Fix typos in comments. Fixes #7761
  • Fix error in example embedded in basic_socket::get_option's documentation. Fixes #7562
  • Use long rather than int for SSL_CTX options, to match OpenSSL. Fixes #7209
  • Use _snwprintf to address a compile error due to the changed swprintf signature in recent versions of MinGW. Fixes #7373
  • Fix deadlock that can occur on Windows when shutting down a pool of io_service threads due to running out of work. Fixes #7552
  • Enable noexcept qualifier for error categories. Fixes #7797
  • Treat errors from accept as non-fatal. Fixes #7488
  • Add a small block recycling optimisation.
  • Version bump.
  • Regenerate documentation.
View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.