Skip to content

Commit

Permalink
general: fix ws
Browse files Browse the repository at this point in the history
  • Loading branch information
PetrMitin committed May 28, 2024
1 parent a2b584b commit a0c1b30
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
steps:

- name: Set up Go 1.22
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ^1.22

- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Get dependencies
run: go get ./...
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
steps:

- name: Set up Go 1.22
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ^1.22

- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Get dependencies
run: go get ./...
Expand Down Expand Up @@ -51,6 +51,7 @@ jobs:
key: ${{ secrets.SSH_KEY }}
script: |
cd ./back
sudo docker builder prune -f
sudo git checkout dev
sudo git pull
sudo make docker-build
Expand Down
6 changes: 1 addition & 5 deletions internal/rest/chat/chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,11 +363,7 @@ func (c *ChatServer) listenWrite(ctx context.Context, client *chat.Client) {

for {
select {
case message, ok := <-client.Send:
if !ok {
return
}

case message := <-client.Send:
messages := make([][]byte, 0, len(client.Send)+1)

messageData, err := easyjson.Marshal(message)
Expand Down

0 comments on commit a0c1b30

Please sign in to comment.