This repository was archived by the owner on Aug 2, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +3
-1
lines changed Expand file tree Collapse file tree 3 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ struct Config {
31
31
std::string ws_reverse_api_url = " " ;
32
32
std::string ws_reverse_event_url = " " ;
33
33
unsigned long ws_reverse_reconnect_interval = 3000 ;
34
+ bool ws_reverse_reconnect_on_code_1000 = false ;
34
35
bool use_ws_reverse = false ;
35
36
std::string post_url = " " ;
36
37
std::string access_token = " " ;
Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ optional<Config> load_configuration(const string &filepath) {
101
101
GET_CONFIG (ws_reverse_api_url, string);
102
102
GET_CONFIG (ws_reverse_event_url, string);
103
103
GET_CONFIG (ws_reverse_reconnect_interval, unsigned long );
104
+ GET_BOOL_CONFIG (ws_reverse_reconnect_on_code_1000);
104
105
GET_BOOL_CONFIG (use_ws_reverse);
105
106
GET_CONFIG (post_url, string);
106
107
GET_CONFIG (access_token, string);
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ shared_ptr<WsClientT> WsReverseService::SubServiceBase::init_ws_reverse_client(c
14
14
}
15
15
client->on_close = [&](shared_ptr<typename WsClientT::Connection> connection,
16
16
int code, string reason) {
17
- if (code != 1000 ) {
17
+ if (config. ws_reverse_reconnect_on_code_1000 || code != 1000 ) {
18
18
with_unique_lock (should_reconnect_mutex_, [&]() {
19
19
should_reconnect_ = true ;
20
20
});
You can’t perform that action at this time.
0 commit comments