summaryrefslogtreecommitdiff
path: root/src/zmq_connecter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/zmq_connecter.cpp')
-rw-r--r--src/zmq_connecter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/zmq_connecter.cpp b/src/zmq_connecter.cpp
index cd7d1b5..5bda48d 100644
--- a/src/zmq_connecter.cpp
+++ b/src/zmq_connecter.cpp
@@ -17,6 +17,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <new>
+
#include "zmq_connecter.hpp"
#include "zmq_connecter_init.hpp"
#include "io_thread.hpp"
@@ -87,8 +89,8 @@ void zmq::zmq_connecter_t::out_event ()
// Create an init object.
io_thread_t *io_thread = choose_io_thread (options.affinity);
- zmq_connecter_init_t *init = new zmq_connecter_init_t (io_thread, owner,
- fd, options, session_name.c_str (), address.c_str ());
+ zmq_connecter_init_t *init = new (std::nothrow) zmq_connecter_init_t (
+ io_thread, owner, fd, options, session_name.c_str (), address.c_str ());
zmq_assert (init);
send_plug (init);
send_own (owner, init);