Skip to content

Commit

Permalink
再接続のテストがうまくいかない
Browse files Browse the repository at this point in the history
  • Loading branch information
na-trium-144 committed Sep 15, 2024
1 parent 55afd5b commit a75cf96
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions client/src/client_threading.cc
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ void internal::wsThreadMain(const std::shared_ptr<ClientData> &data) {
data, data->packSyncDataFirst(*data->sync_first));
}
} else {
data->do_ws_init = false;
if (last_recv) {
// syncデータがなければ、100us間隔を空ける
data->recv_ready = true;
Expand Down
3 changes: 3 additions & 0 deletions tests/client_test_2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ TEST_F(ClientTest, valueReqTiming) {
// 2. 接続前、sync後
wcli_->member("a").value("2").request();

wait();
dummy_s = std::make_shared<DummyServer>(false);
wait();
wcli_->start();
Expand All @@ -92,12 +93,14 @@ TEST_F(ClientTest, valueReqTiming) {
while (wcli_->connected()) {
wait();
}
wait();
// 4. 切断後、sync前
wcli_->member("a").value("4").request();
wcli_->sync();
// 5. 切断後、sync後
wcli_->member("a").value("5").request();

wait();
dummy_s = std::make_shared<DummyServer>(false);
wait();
wcli_->start();
Expand Down

0 comments on commit a75cf96

Please sign in to comment.