Merge branch 'master' into add-close-code-to-websocket-and-fixes

This commit is contained in:
Alexandre Konieczny 2019-04-24 09:06:34 +02:00
commit ec3896e61b
4 changed files with 23 additions and 4 deletions

View File

@ -199,7 +199,20 @@ make install # will install to /usr/local on Unix, on macOS it is a good idea to
Headers and a static library will be installed to the target dir. Headers and a static library will be installed to the target dir.
There is a Dockerfile for running some code on Linux, and a unittest which can be executed by typing `make test`. There is a unittest which can be executed by typing `make test`.
There is a Dockerfile for running some code on Linux. To use docker-compose you must make a docker container first.
```
$ make docker
...
$ docker compose up &
...
$ docker exec -it ixwebsocket_ws_1 bash
app@ca2340eb9106:~$ ws --help
ws is a websocket tool
...
```
Finally you can build and install the `ws command line tool` with Homebrew. The homebrew version might be slightly out of date. Finally you can build and install the `ws command line tool` with Homebrew. The homebrew version might be slightly out of date.

View File

@ -11,6 +11,10 @@ services:
- redis1 - redis1
ws: ws:
security_opt:
- seccomp:unconfined
cap_add:
- SYS_PTRACE
stdin_open: true stdin_open: true
tty: true tty: true
image: bsergean/ws:build image: bsergean/ws:build

View File

@ -31,7 +31,7 @@ docker_push:
docker push ${LATEST} docker push ${LATEST}
run: run:
docker run --cap-add sys_ptrace -it ws:latest docker run --cap-add sys_ptrace --entrypoint=bash -it bsergean/ws:build
# this is helpful to remove trailing whitespaces # this is helpful to remove trailing whitespaces
trail: trail:

View File

@ -53,10 +53,12 @@ namespace ix
{ {
cobraMetricsPublisher.push(channel, data); cobraMetricsPublisher.push(channel, data);
} }
cobraMetricsPublisher.suspend();
std::this_thread::sleep_for(std::chrono::milliseconds(100)); cobraMetricsPublisher.suspend();
cobraMetricsPublisher.resume(); cobraMetricsPublisher.resume();
// FIXME: investigate why without this check we trigger a lock
while (!cobraMetricsPublisher.isAuthenticated()) ;
} }
} }