Fix Max instance validation
This commit is contained in:
@@ -46,7 +46,7 @@ func NewInstance(rw http.ResponseWriter, req *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if playground.MaxInstances > 0 && len(instances) > playground.MaxInstances {
|
if playground.MaxInstances > 0 && len(instances) >= playground.MaxInstances {
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
rw.WriteHeader(http.StatusConflict)
|
rw.WriteHeader(http.StatusConflict)
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user