about summary refs log tree commit diff
path: root/pkg/discord/gateway/gateway.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/discord/gateway/gateway.go')
-rw-r--r--pkg/discord/gateway/gateway.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/discord/gateway/gateway.go b/pkg/discord/gateway/gateway.go
index 18cf708..d1311c2 100644
--- a/pkg/discord/gateway/gateway.go
+++ b/pkg/discord/gateway/gateway.go
@@ -7,6 +7,7 @@ import (
 	"jinx/pkg/discord/events"
 	"jinx/pkg/libs/cancellablewebsocket"
 	"net/http"
+	"time"
 
 	"github.com/gorilla/websocket"
 	"github.com/rs/zerolog"
@@ -62,7 +63,8 @@ func (g *GatewayImpl) Start(ctx context.Context, url string, token string) error
 		return err
 	}
 
-	g.heartbeat.Start(ctx, hello.HeartbeatInterval)
+	heartbeatInterval := time.Duration(hello.HeartbeatInterval) * time.Millisecond
+	g.heartbeat.Start(ctx, heartbeatInterval)
 
 	if err = g.identify(token); err != nil {
 		return err