summaryrefslogtreecommitdiff
path: root/src/socket_base.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2012-04-05 10:41:47 +0200
committerMartin Sustrik <sustrik@250bpm.com>2012-04-06 12:56:24 +0200
commita5fefa3d5ba405deedba689b056959358048d935 (patch)
tree219d2936e57003c785aa1bf8f57b5be294823fe0 /src/socket_base.cpp
parent494d4d36237f37c455f6689fca280ed75498403a (diff)
EMTHREAD error code removed
libxs (as opposed to libzmq) requires at least one I/O thread per context. Thus, "no I/O thread available" error doesn't make sense anyome. This patch removes the code and the documentation. It keeps the definition of EMTHREAD itself for backward compatibility. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/socket_base.cpp')
-rw-r--r--src/socket_base.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/socket_base.cpp b/src/socket_base.cpp
index fbb3b5e..5b1752e 100644
--- a/src/socket_base.cpp
+++ b/src/socket_base.cpp
@@ -326,10 +326,7 @@ int xs::socket_base_t::bind (const char *addr_)
// Remaining trasnports require to be run in an I/O thread, so at this
// point we'll choose one.
io_thread_t *thread = choose_io_thread (options.affinity);
- if (!thread) {
- errno = EMTHREAD;
- return -1;
- }
+ xs_assert (thread);
if (protocol == "tcp") {
tcp_listener_t *listener = new (std::nothrow) tcp_listener_t (
@@ -437,10 +434,7 @@ int xs::socket_base_t::connect (const char *addr_)
// Choose the I/O thread to run the session in.
io_thread_t *thread = choose_io_thread (options.affinity);
- if (!thread) {
- errno = EMTHREAD;
- return -1;
- }
+ xs_assert (thread);
// Create session.
session_base_t *session = session_base_t::create (thread, true, this,