fixed #5
This commit is contained in:
parent
e71d3ba877
commit
385c762ddd
|
@ -5,6 +5,7 @@ import (
|
||||||
"github.com/fatih/color"
|
"github.com/fatih/color"
|
||||||
"log"
|
"log"
|
||||||
"sync"
|
"sync"
|
||||||
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -62,6 +63,15 @@ type App struct {
|
||||||
func init() {
|
func init() {
|
||||||
log.SetFlags(0)
|
log.SetFlags(0)
|
||||||
log.SetOutput(new(logWriter))
|
log.SetOutput(new(logWriter))
|
||||||
|
|
||||||
|
// increases the files limit
|
||||||
|
var rLimit syscall.Rlimit
|
||||||
|
rLimit.Max = 10000
|
||||||
|
rLimit.Cur = 10000
|
||||||
|
err := syscall.Setrlimit(syscall.RLIMIT_NOFILE, &rLimit)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println(Red("Error Setting Rlimit "), err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Init is an instance of app with default values
|
// Init is an instance of app with default values
|
||||||
|
|
Loading…
Reference in New Issue