Browse Source

🐛 Fiber: Fix Prefork (#5878)

* Update Fiber v1.10.0

* Fiber: Bump v1.12.0

* Update constant

* Fiber optimization

* v1.12.1

* Update dependencies

* Update cached worlds test

* Update cached test

* Update cached test

* Update cache test

* Fix cache test

* Update cache test

* Update cache test

* Fix panic

* 🧹 Fix test-requirements

* 👩‍🚀 Optimize response

* 🐛 Fix typo

* 📦 Update test

* 📦 Bump v1.12.6

* 🐛 Fix test

* 🐛 Fix test

* 🧹

* 📘 Add two simple benchmark test cases

* 🍬 remove extra '&'

* 🐛 Fix JSON pointer

* 🐛 Fiber: Fix Prefork

Co-authored-by: Fenny <Fenny>
Co-authored-by: kiyon <[email protected]>
fenny 5 years ago
parent
commit
03b6f6591c
1 changed files with 9 additions and 0 deletions
  1. 9 0
      frameworks/Go/fiber/src/server.go

+ 9 - 0
frameworks/Go/fiber/src/server.go

@@ -43,6 +43,15 @@ func main() {
 		DisableHeaderNormalizing: true,
 		DisableHeaderNormalizing: true,
 		ServerHeader:             "go",
 		ServerHeader:             "go",
 	})
 	})
+	if utils.GetArgument("-prefork") {
+		app.Settings.Prefork = true
+	}
+	if utils.GetArgument("-prefork-child") {
+		child = true
+	}
+	if utils.GetArgument("-nogc") {
+		debug.SetGCPercent(-1)
+	}
 
 
 	if utils.GetArgument("-prefork-child") {
 	if utils.GetArgument("-prefork-child") {
 		child = true
 		child = true