Skip to content

Commit

Permalink
ws cobra publish stress mode fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bsergean committed Apr 24, 2019
1 parent 8ff1339 commit 773f923
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ services:
- redis1

ws:
security_opt:
- seccomp:unconfined
cap_add:
- SYS_PTRACE
stdin_open: true
tty: true
image: bsergean/ws:build
Expand Down
6 changes: 4 additions & 2 deletions ws/ws_cobra_publish.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,12 @@ namespace ix
{
cobraMetricsPublisher.push(channel, data);
}
cobraMetricsPublisher.suspend();

std::this_thread::sleep_for(std::chrono::milliseconds(100));
cobraMetricsPublisher.suspend();
cobraMetricsPublisher.resume();

// FIXME: investigate why without this check we trigger a lock
while (!cobraMetricsPublisher.isAuthenticated()) ;
}
}

Expand Down

0 comments on commit 773f923

Please sign in to comment.