Skip to content

Reconnecting to PubSub crashes the bot #648

@zneix

Description

@zneix

Running (4e61221@master go1.17.4 built 2021-12-06T16:30:41+01:00)

Dec 15 17:46:17 shungite pajbot2[287959]: 2021/12/15 17:46:17 Channel zneixbot initialized successfully
Dec 15 17:46:17 shungite pajbot2[287959]: 2021/12/15 17:46:17 Channel zneix initialized successfully
Dec 15 17:48:06 shungite pajbot2[287959]: [go-twitch-pubsub] Lost connection, will try to reconnect
Dec 15 18:13:37 shungite pajbot2[287959]: panic: concurrent write to websocket connection
Dec 15 18:13:37 shungite pajbot2[287959]: goroutine 1028817 [running]:
Dec 15 18:13:38 shungite pajbot2[287959]: github.com/gorilla/websocket.(*messageWriter).flushFrame(0xc000ffb2c0, 0x1, {0x0, 0x7f4981dcb5b8, 0x0})
Dec 15 18:13:38 shungite pajbot2[287959]:         /opt/pajbot/go/pkg/mod/github.com/gorilla/websocket@v1.4.2/conn.go:610 +0x52b
Dec 15 18:13:38 shungite pajbot2[287959]: github.com/gorilla/websocket.(*messageWriter).Close(0x0)
Dec 15 18:13:38 shungite pajbot2[287959]:         /opt/pajbot/go/pkg/mod/github.com/gorilla/websocket@v1.4.2/conn.go:724 +0x45
Dec 15 18:13:38 shungite pajbot2[287959]: github.com/gorilla/websocket.(*Conn).beginMessage(0xc000e4b340, 0xc003b6c270, 0x1)
Dec 15 18:13:38 shungite pajbot2[287959]:         /opt/pajbot/go/pkg/mod/github.com/gorilla/websocket@v1.4.2/conn.go:473 +0x42
Dec 15 18:13:38 shungite pajbot2[287959]: github.com/gorilla/websocket.(*Conn).NextWriter(0xc000e4b340, 0x1)
Dec 15 18:13:38 shungite pajbot2[287959]:         /opt/pajbot/go/pkg/mod/github.com/gorilla/websocket@v1.4.2/conn.go:513 +0x45
Dec 15 18:13:38 shungite pajbot2[287959]: github.com/gorilla/websocket.(*Conn).WriteMessage(0xc00004bf98, 0xc00004bf78, {0xc002696810, 0x0, 0x9d3d01})
Dec 15 18:13:38 shungite pajbot2[287959]:         /opt/pajbot/go/pkg/mod/github.com/gorilla/websocket@v1.4.2/conn.go:766 +0x165
Dec 15 18:13:38 shungite pajbot2[287959]: github.com/pajlada/go-twitch-pubsub.(*connection).startWriter(0xc000e6f290)
Dec 15 18:13:38 shungite pajbot2[287959]:         /opt/pajbot/go/pkg/mod/github.com/pajlada/go-twitch-pubsub@v0.0.0-20190525183000-d70aff1c5c71/connection.go:220 +0x47
Dec 15 18:13:38 shungite pajbot2[287959]: created by github.com/pajlada/go-twitch-pubsub.(*connection).connect
Dec 15 18:13:38 shungite pajbot2[287959]:         /opt/pajbot/go/pkg/mod/github.com/pajlada/go-twitch-pubsub@v0.0.0-20190525183000-d70aff1c5c71/connection.go:190 +0xfd
Dec 15 18:13:38 shungite systemd[1]: pajbot2.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Dec 15 18:13:38 shungite systemd[1]: pajbot2.service: Failed with result 'exit-code'.
Dec 15 18:13:38 shungite systemd[1]: pajbot2.service: Consumed 13min 22.885s CPU time.
Dec 15 18:13:40 shungite systemd[1]: pajbot2.service: Scheduled restart job, restart counter is at 2.
Dec 15 18:13:40 shungite systemd[1]: Stopped pajbot2.
Dec 15 18:13:40 shungite systemd[1]: pajbot2.service: Consumed 13min 22.885s CPU time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssues relating to bugs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions