mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-09-15 17:46:55 +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
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue