1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-03 00:18:31 +00:00

Set min memory to 24mb if blank

This commit is contained in:
Kane York 2015-11-17 11:04:10 -08:00
parent da790fbaa6
commit 096fe787b7
2 changed files with 10 additions and 3 deletions

View file

@ -310,7 +310,7 @@ func GenerateKeys(outputFile, serverID, theirPublicStr string) {
ListenAddr: "0.0.0.0:8001",
SocketOrigin: "localhost:8001",
BackendURL: "http://localhost:8002/ffz",
MinMemoryBytes: 1024 * 1024 * 24,
MinMemoryBytes: defaultMinMemory,
}
output.ServerID, err = strconv.Atoi(serverID)

View file

@ -35,6 +35,11 @@ const AuthorizeCommand Command = "do_authorize"
// on a goroutine over the ClientInfo.MessageChannel and should not be delivered immediately.
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.
var ResponseSuccess = ClientMessage{Command: SuccessCommand}
@ -47,6 +52,10 @@ var Configuration *ConfigFile
func SetupServerAndHandle(config *ConfigFile, serveMux *http.ServeMux) {
Configuration = config
if config.MinMemoryBytes == 0 {
config.MinMemoryBytes = defaultMinMemory
}
setupBackend(config)
if serveMux == nil {
@ -88,8 +97,6 @@ func SetupServerAndHandle(config *ConfigFile, serveMux *http.ServeMux) {
go ircConnection()
}
const TwitchDotTv = "http://www.twitch.tv"
// SocketUpgrader is the websocket.Upgrader currently in use.
var SocketUpgrader = websocket.Upgrader{
ReadBufferSize: 1024,