summaryrefslogtreecommitdiff
path: root/src/zmq_listener_init.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@fastmq.commkdir>2009-12-15 23:49:55 +0100
committerMartin Sustrik <sustrik@fastmq.commkdir>2009-12-15 23:49:55 +0100
commit8aa0908635f255e2d533539d5330b92b62dc88ba (patch)
treef72f8dc99463cb0e56213dbde735ed585986cbfb /src/zmq_listener_init.cpp
parent2cef05d86976784f4bc1083cb0fa548e267ac132 (diff)
all news converted to nothrow variant
Diffstat (limited to 'src/zmq_listener_init.cpp')
-rw-r--r--src/zmq_listener_init.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/zmq_listener_init.cpp b/src/zmq_listener_init.cpp
index a463dc8..97ea477 100644
--- a/src/zmq_listener_init.cpp
+++ b/src/zmq_listener_init.cpp
@@ -17,6 +17,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <new>
+
#include "zmq_listener_init.hpp"
#include "io_thread.hpp"
#include "session.hpp"
@@ -29,7 +31,8 @@ zmq::zmq_listener_init_t::zmq_listener_init_t (io_thread_t *parent_,
has_peer_identity (false)
{
// Create associated engine object.
- engine = new zmq_engine_t (parent_, fd_, options, false, NULL);
+ engine = new (std::nothrow) zmq_engine_t (parent_, fd_, options,
+ false, NULL);
zmq_assert (engine);
}
@@ -74,8 +77,8 @@ void zmq::zmq_listener_init_t::flush ()
session = owner->find_session (peer_identity.c_str ());
if (!session) {
io_thread_t *io_thread = choose_io_thread (options.affinity);
- session = new session_t (io_thread, owner, peer_identity.c_str (),
- options, false);
+ session = new (std::nothrow) session_t (io_thread, owner,
+ peer_identity.c_str (), options, false);
zmq_assert (session);
send_plug (session);
send_own (owner, session);