Projects STRLCPY prox5 Commits cb4f28f1
🤬
  • ■ ■ ■ ■ ■
    daemons.go
    skipped 94 lines
    95 95   p5.Pending <- p
    96 96   }
    97 97   default:
     98 + time.Sleep(500 * time.Millisecond)
    98 99   p5.recycling()
    99 100   }
    100 101   }
    skipped 52 lines
    153 154   }
    154 155   
    155 156   default:
    156  - time.Sleep(25 * time.Millisecond)
     157 + time.Sleep(500 * time.Millisecond)
    157 158   count := p5.recycling()
    158 159   buf := pools.CopABuffer.Get().(*strings.Builder)
    159 160   buf.WriteString("recycled ")
    skipped 12 lines
  • ■ ■ ■ ■ ■ ■
    list_management.go
    skipped 1 lines
    2 2   
    3 3  import (
    4 4   "bufio"
     5 + "fmt"
    5 6   "io"
    6 7   "os"
    7 8   "strings"
    skipped 55 lines
    63 64   return
    64 65  }
    65 66   
    66  -func (p5 *Swamp) loadSingleProxy(sock string) {
     67 +func (p5 *Swamp) loadSingleProxy(sock string) error {
    67 68   for {
    68 69   select {
    69 70   case inChan <- sock:
    70  - return
     71 + return nil
    71 72   default:
    72  - time.Sleep(1 * time.Second)
     73 + return fmt.Errorf("cannot load %s, channel is full", sock)
    73 74   }
    74 75   }
    75 76  }
    skipped 10 lines
    86 87   var count int
    87 88   scan := bufio.NewScanner(strings.NewReader(socks))
    88 89   for scan.Scan() {
    89  - if p5.LoadSingleProxy(scan.Text()) {
    90  - count++
     90 + if err := p5.loadSingleProxy(scan.Text()); err != nil {
     91 + continue
    91 92   }
     93 + count++
    92 94   }
    93 95   return count
    94 96  }
    skipped 7 lines
Please wait...
Page is in error, reload to recover