mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-05 22:00:54 +00:00
Set min memory to 24mb if blank
This commit is contained in:
parent
da790fbaa6
commit
096fe787b7
2 changed files with 10 additions and 3 deletions
|
@ -310,7 +310,7 @@ func GenerateKeys(outputFile, serverID, theirPublicStr string) {
|
||||||
ListenAddr: "0.0.0.0:8001",
|
ListenAddr: "0.0.0.0:8001",
|
||||||
SocketOrigin: "localhost:8001",
|
SocketOrigin: "localhost:8001",
|
||||||
BackendURL: "http://localhost:8002/ffz",
|
BackendURL: "http://localhost:8002/ffz",
|
||||||
MinMemoryBytes: 1024 * 1024 * 24,
|
MinMemoryBytes: defaultMinMemory,
|
||||||
}
|
}
|
||||||
|
|
||||||
output.ServerID, err = strconv.Atoi(serverID)
|
output.ServerID, err = strconv.Atoi(serverID)
|
||||||
|
|
|
@ -35,6 +35,11 @@ const AuthorizeCommand Command = "do_authorize"
|
||||||
// on a goroutine over the ClientInfo.MessageChannel and should not be delivered immediately.
|
// on a goroutine over the ClientInfo.MessageChannel and should not be delivered immediately.
|
||||||
const AsyncResponseCommand Command = "_async"
|
const AsyncResponseCommand Command = "_async"
|
||||||
|
|
||||||
|
const defaultMinMemory = 1024 * 1024 * 24
|
||||||
|
|
||||||
|
// TwitchDotTv is the http origin for twitch.tv.
|
||||||
|
const TwitchDotTv = "http://www.twitch.tv"
|
||||||
|
|
||||||
// ResponseSuccess is a Reply ClientMessage with the MessageID not yet filled out.
|
// ResponseSuccess is a Reply ClientMessage with the MessageID not yet filled out.
|
||||||
var ResponseSuccess = ClientMessage{Command: SuccessCommand}
|
var ResponseSuccess = ClientMessage{Command: SuccessCommand}
|
||||||
|
|
||||||
|
@ -47,6 +52,10 @@ var Configuration *ConfigFile
|
||||||
func SetupServerAndHandle(config *ConfigFile, serveMux *http.ServeMux) {
|
func SetupServerAndHandle(config *ConfigFile, serveMux *http.ServeMux) {
|
||||||
Configuration = config
|
Configuration = config
|
||||||
|
|
||||||
|
if config.MinMemoryBytes == 0 {
|
||||||
|
config.MinMemoryBytes = defaultMinMemory
|
||||||
|
}
|
||||||
|
|
||||||
setupBackend(config)
|
setupBackend(config)
|
||||||
|
|
||||||
if serveMux == nil {
|
if serveMux == nil {
|
||||||
|
@ -88,8 +97,6 @@ func SetupServerAndHandle(config *ConfigFile, serveMux *http.ServeMux) {
|
||||||
go ircConnection()
|
go ircConnection()
|
||||||
}
|
}
|
||||||
|
|
||||||
const TwitchDotTv = "http://www.twitch.tv"
|
|
||||||
|
|
||||||
// SocketUpgrader is the websocket.Upgrader currently in use.
|
// SocketUpgrader is the websocket.Upgrader currently in use.
|
||||||
var SocketUpgrader = websocket.Upgrader{
|
var SocketUpgrader = websocket.Upgrader{
|
||||||
ReadBufferSize: 1024,
|
ReadBufferSize: 1024,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue