mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-23 00:38:33 +02:00
refactor: introduce Pool interface, move agent_pool to agent module
This commit is contained in:
@@ -40,7 +40,7 @@ func NewAgent(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
hostport := fmt.Sprintf("%s:%d", host, port)
|
||||
if _, ok := config.GetInstance().GetAgent(hostport); ok {
|
||||
if _, ok := agent.Agents.Get(hostport); ok {
|
||||
gphttp.ClientError(w, gphttp.ErrAlreadyExists("agent", hostport), http.StatusConflict)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user