bbernhard / signal-cli-rest-api

Dockerized Signal Messenger REST API
https://bbernhard.github.io/signal-cli-rest-api/
MIT License
1.26k stars 151 forks source link

panic: concurrent write to websocket #556

Open Kuhkaefer opened 1 month ago

Kuhkaefer commented 1 month ago

The problem

I was trying to send many messages using 8 consumers in the signalbot and got this error:

panic: concurrent write to websocket connection

goroutine 137 [running]:
github.com/gorilla/websocket.(*messageWriter).flushFrame(0x4000417f08, 0x1, {0x15f21c0?, 0x4000417f88?, 0x400035af00?})
        /go/pkg/mod/github.com/gorilla/websocket@v1.5.0/conn.go:617 +0x460
github.com/gorilla/websocket.(*Conn).WriteMessage(0x4000d518c0, 0x4000417f78?, {0x15f21c0, 0x0, 0x0})
        /go/pkg/mod/github.com/gorilla/websocket@v1.5.0/conn.go:770 +0xf4
github.com/bbernhard/signal-cli-rest-api/api.wsPing(0x4000d518c0, 0x40001968a0)
        /tmp/signal-cli-rest-api-src/api/api.go:524 +0x90
created by github.com/bbernhard/signal-cli-rest-api/api.(*Api).Receive in goroutine 134
        /tmp/signal-cli-rest-api-src/api/api.go:564 +0x750

Are you using the latest released version?

Have you read the troubleshooting page?

What type of installation are you running?

signal-cli-rest-api Docker Container

In which mode are you using the docker container?

JSON-RPC Mode

What's the architecture of your host system?

x86-64

Additional information

No response

bbernhard commented 1 month ago

Please give this version a try bbernhard/signal-cli-rest-api:0.163-dev. Not sure if everything is fixed, but it should for sure be better.

Kuhkaefer commented 1 month ago

thanks, will do!