aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/src/protocols/protocol.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libtransport/src/protocols/protocol.cc')
-rw-r--r--libtransport/src/protocols/protocol.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/libtransport/src/protocols/protocol.cc b/libtransport/src/protocols/protocol.cc
index d1bd566a0..451fef80d 100644
--- a/libtransport/src/protocols/protocol.cc
+++ b/libtransport/src/protocols/protocol.cc
@@ -48,12 +48,6 @@ int TransportProtocol::start() {
// If the protocol is already running, return otherwise set as running
if (is_running_) return -1;
- // Reset the protocol state machine
- reset();
-
- // Set it is the first time we schedule an interest
- is_first_ = true;
-
// Get all callbacks references before starting
socket_->getSocketOption(ConsumerCallbacksOptions::INTEREST_RETRANSMISSION,
&on_interest_retransmission_);
@@ -75,6 +69,11 @@ int TransportProtocol::start() {
&on_payload_);
socket_->getSocketOption(GeneralTransportOptions::ASYNC_MODE, is_async_);
+ // Set it is the first time we schedule an interest
+ is_first_ = true;
+
+ // Reset the protocol state machine
+ reset();
// Schedule next interests
scheduleNextInterests();