Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed ERROR no headers found in message occurring every minute #116

Merged
merged 2 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM --platform=$BUILDPLATFORM golang:latest
COPY . /go/src/github.com/chmouel/gosmee
WORKDIR /go/src/github.com/chmouel/gosmee
COPY . /go/src/github.com/aaamosljp/gosmee
aamosljp marked this conversation as resolved.
Show resolved Hide resolved
WORKDIR /go/src/github.com/aaamosljp/gosmee
ARG TARGETARCH
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} go build -a -ldflags="-s -w" -installsuffix cgo -o /tmp/gosmee .

Expand Down
7 changes: 7 additions & 0 deletions gosmee/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,13 @@ func (c goSmee) clientSetup() error {
return
}

if string(msg.Event) == "ping" {
return
} /* Apparently github sends
* a ping every minute but it's not
* documented anywhere for some reason
*/

pm, err := c.parse(now, msg.Data)
if err != nil {
fmt.Fprintf(os.Stdout,
Expand Down
Loading