mirror of
https://github.com/diamondburned/arikawa.git
synced 2025-01-05 19:57:02 +00:00
Gateway: Deprecated OP chan API, use PacerLoop.Extras instead
This commit is contained in:
parent
54ac0a6951
commit
95624292f7
|
@ -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.
|
||||
|
|
|
@ -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?
|
||||
|
|
Loading…
Reference in a new issue