File tree 2 files changed +11
-7
lines changed 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -706,15 +706,19 @@ void Client::handleDisconnectEvent()
706
706
disableSocketRead ();
707
707
disableSocketWrite ();
708
708
709
- if (d_->state >= State::kTcpConnected ) {
710
- if (d_->state == State::kMqttConnected ) {
711
- ++d_->cb_level ;
709
+ if (d_->state == State::kTcpConnected ||
710
+ d_->state == State::kMqttConnected ) {
711
+ tryReconnect ();
712
+
713
+ ++d_->cb_level ;
714
+ if (d_->state == State::kTcpConnected ) {
715
+ if (d_->callbacks .connect_fail )
716
+ d_->callbacks .connect_fail ();
717
+ } else {
712
718
if (d_->callbacks .disconnected )
713
719
d_->callbacks .disconnected ();
714
- --d_->cb_level ;
715
720
}
716
-
717
- tryReconnect ();
721
+ --d_->cb_level ;
718
722
}
719
723
}
720
724
Original file line number Diff line number Diff line change 21
21
# TBOX版本号
22
22
TBOX_VERSION_MAJOR := 1
23
23
TBOX_VERSION_MINOR := 10
24
- TBOX_VERSION_REVISION := 7
24
+ TBOX_VERSION_REVISION := 8
You can’t perform that action at this time.
0 commit comments