mirror of
https://github.com/diamondburned/arikawa.git
synced 2025-03-27 12:29:29 +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.
|
// reconnections or any type of connection interruptions.
|
||||||
AfterClose func(err error) // noop by default
|
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
|
// 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
|
// Start() is not called or Close() is called. Also doesn't block for
|
||||||
// Identify or Resume.
|
// Identify or Resume.
|
||||||
|
|
|
@ -30,10 +30,6 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
func (g *Gateway) HandleOP(op *wsutil.OP) error {
|
func (g *Gateway) HandleOP(op *wsutil.OP) error {
|
||||||
if g.OP != nil {
|
|
||||||
g.OP <- op
|
|
||||||
}
|
|
||||||
|
|
||||||
switch op.Code {
|
switch op.Code {
|
||||||
case HeartbeatAckOP:
|
case HeartbeatAckOP:
|
||||||
// Heartbeat from the server?
|
// Heartbeat from the server?
|
||||||
|
|
Loading…
Reference in a new issue