update go mod
This commit is contained in:
@@ -2,7 +2,6 @@ package notify
|
||||
|
||||
import (
|
||||
"b612.me/stario"
|
||||
"b612.me/starnet"
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
@@ -22,7 +21,7 @@ type ServerCommon struct {
|
||||
status Status
|
||||
listener net.Listener
|
||||
udpListener *net.UDPConn
|
||||
queue *starnet.StarQueue
|
||||
queue *stario.StarQueue
|
||||
stopFn context.CancelFunc
|
||||
stopCtx context.Context
|
||||
maxReadTimeout time.Duration
|
||||
@@ -106,7 +105,7 @@ func (s *ServerCommon) Listen(network string, addr string) error {
|
||||
return errors.New("server already run")
|
||||
}
|
||||
s.stopCtx, s.stopFn = context.WithCancel(context.Background())
|
||||
s.queue = starnet.NewQueueCtx(s.stopCtx, 128, math.MaxUint32)
|
||||
s.queue = stario.NewQueueCtx(s.stopCtx, 128, math.MaxUint32)
|
||||
if strings.Contains(strings.ToLower(network), "udp") {
|
||||
return s.ListenUDP(network, addr)
|
||||
}
|
||||
@@ -293,7 +292,7 @@ func (s *ServerCommon) loadMessage() {
|
||||
continue
|
||||
}
|
||||
s.wg.Add(1)
|
||||
go func(data starnet.MsgQueue) {
|
||||
go func(data stario.MsgQueue) {
|
||||
s.mu.RLock()
|
||||
cc, ok := s.clientPool[data.Conn.(string)]
|
||||
s.mu.RUnlock()
|
||||
|
||||
Reference in New Issue
Block a user