Skip to content

Commit d9cddf3

Browse files
committed
Socket::Unmonitor: Don't throw a C++ exception
1 parent bc2ae03 commit d9cddf3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

binding.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,8 +1060,10 @@ namespace zmq {
10601060
zmq_socket_monitor(this->socket_, NULL, ZMQ_EVENT_ALL);
10611061

10621062
// Close the monitor socket and stop timer
1063-
if (zmq_close(this->monitor_socket_) < 0)
1064-
throw std::runtime_error(ErrorMessage());
1063+
if (zmq_close(this->monitor_socket_) < 0) {
1064+
Nan::ThrowError(ErrorMessage());
1065+
return;
1066+
}
10651067
uv_timer_stop(this->monitor_handle_);
10661068
this->monitor_handle_ = NULL;
10671069
this->monitor_socket_ = NULL;

0 commit comments

Comments
 (0)