mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-09-01 00:44:02 +03:00
Update to go 1.19
This commit is contained in:
+2
-2
@@ -30,7 +30,7 @@ type connection struct {
|
||||
channelConnDetach chan conntypes.ConnID
|
||||
}
|
||||
|
||||
func (c *connection) run() { // nolint: cyclop
|
||||
func (c *connection) run() { //nolint: cyclop
|
||||
defer c.Close()
|
||||
|
||||
ttl := time.NewTimer(connectionTTL)
|
||||
@@ -148,7 +148,7 @@ func newConnection(req *protocol.TelegramRequest) (*connection, error) {
|
||||
return nil, fmt.Errorf("cannot create a new connection: %w", err)
|
||||
}
|
||||
|
||||
id := rand.Int() // nolint: gosec
|
||||
id := rand.Int() //nolint: gosec
|
||||
rv := &connection{
|
||||
conn: conn,
|
||||
id: id,
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ func (h *hub) Register(req *protocol.TelegramRequest) (*ProxyConn, error) {
|
||||
}
|
||||
|
||||
func (h *hub) getMux(req *protocol.TelegramRequest) *mux {
|
||||
key := 32767 + int32(req.ClientProtocol.DC()) + 100000*int32(req.ClientProtocol.ConnectionProtocol()) // nolint: gomnd
|
||||
key := 32767 + int32(req.ClientProtocol.DC()) + 100000*int32(req.ClientProtocol.ConnectionProtocol()) //nolint: gomnd
|
||||
|
||||
h.mutex.RLock()
|
||||
m, ok := h.muxes[key]
|
||||
|
||||
Reference in New Issue
Block a user