Replace panics with our logging framework

This commit is contained in:
Gabe Kangas
2021-10-25 00:15:58 -07:00
parent cd15661f08
commit 3f4176d8d6
7 changed files with 14 additions and 11 deletions
+5 -2
View File
@@ -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.