summaryrefslogtreecommitdiff
path: root/src/req.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2012-03-20 17:37:04 +0100
committerMartin Sustrik <sustrik@250bpm.com>2012-03-20 17:37:04 +0100
commit0c99d04db9240f29493a4d774be677dc682547ca (patch)
treee3be78125bb01271dd7f172eaf6cfcc5f2afc08f /src/req.cpp
parent818d122d78e4b3bc55fdc376b43e15841b2e2006 (diff)
Make REQ session state machine aware of reconnections
On reconnections, state machine in req_session_t is reset to the initial state. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/req.cpp')
-rw-r--r--src/req.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/req.cpp b/src/req.cpp
index 01b35ea..2e0e614 100644
--- a/src/req.cpp
+++ b/src/req.cpp
@@ -179,3 +179,9 @@ int xs::req_session_t::write (msg_t *msg_)
return -1;
}
+void xs::req_session_t::detach ()
+{
+ state = options.recv_identity ? identity : bottom;
+ xreq_session_t::detach ();
+}
+