mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 13:54:02 +03:00
Update golanci-lint
This commit is contained in:
+4
-1
@@ -31,7 +31,10 @@ func (d *defaultDialer) DialContext(ctx context.Context, network, address string
|
||||
return nil, fmt.Errorf("cannot dial to %s: %w", address, err)
|
||||
}
|
||||
|
||||
tcpConn := conn.(*net.TCPConn)
|
||||
tcpConn, ok := conn.(*net.TCPConn)
|
||||
if !ok {
|
||||
panic("conn type is not tcp")
|
||||
}
|
||||
|
||||
if err := tcpConn.SetNoDelay(true); err != nil {
|
||||
conn.Close()
|
||||
|
||||
Reference in New Issue
Block a user