Replace panics with our logging framework
This commit is contained in:
+5
-2
@@ -1,11 +1,14 @@
|
||||
package chat
|
||||
|
||||
import "syscall"
|
||||
import (
|
||||
"syscall"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func getMaximumConcurrentConnectionLimit() int64 {
|
||||
var rLimit syscall.Rlimit
|
||||
if err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rLimit); err != nil {
|
||||
panic(err)
|
||||
log.Fatalln(err)
|
||||
}
|
||||
|
||||
// Return the limit to 70% of max so the machine doesn't die even if it's maxed out for some reason.
|
||||
|
||||
Reference in New Issue
Block a user