From 95624292f73c0c672a2ffcaba23b08ab00f65304 Mon Sep 17 00:00:00 2001 From: "diamondburned (Forefront)" Date: Fri, 24 Apr 2020 15:32:14 -0700 Subject: [PATCH] Gateway: Deprecated OP chan API, use PacerLoop.Extras instead --- gateway/gateway.go | 6 ------ gateway/op.go | 4 ---- 2 files changed, 10 deletions(-) diff --git a/gateway/gateway.go b/gateway/gateway.go index 98e2f6f..c7bcc34 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -98,12 +98,6 @@ type Gateway struct { // reconnections or any type of connection interruptions. AfterClose func(err error) // noop by default - // Only use for debugging - - // If this channel is non-nil, all incoming OP packets will also be sent - // here. This should be buffered, so to not block the main loop. - OP chan *wsutil.OP - // Mutex to hold off calls when the WS is not available. Doesn't block if // Start() is not called or Close() is called. Also doesn't block for // Identify or Resume. diff --git a/gateway/op.go b/gateway/op.go index aa6b138..29b6e73 100644 --- a/gateway/op.go +++ b/gateway/op.go @@ -30,10 +30,6 @@ const ( ) func (g *Gateway) HandleOP(op *wsutil.OP) error { - if g.OP != nil { - g.OP <- op - } - switch op.Code { case HeartbeatAckOP: // Heartbeat from the server?