1
This commit is contained in:
parent
3a39acfd9b
commit
ce7a0fd64c
@ -77,8 +77,11 @@ func (this *HttpServer) dispatchRequest(w http.ResponseWriter, r *http.Request)
|
|||||||
func (this *HttpServer) getHandle(handleName string) (func(*http.ResponseWriter, *http.Request)) {
|
func (this *HttpServer) getHandle(handleName string) (func(*http.ResponseWriter, *http.Request)) {
|
||||||
this.handlersMutex.Lock()
|
this.handlersMutex.Lock()
|
||||||
defer this.handlersMutex.Unlock()
|
defer this.handlersMutex.Unlock()
|
||||||
handle, _ := this.handlers[handleName]
|
if handle, ok := this.handlers[handleName]; ok {
|
||||||
return handle
|
return handle
|
||||||
|
} else {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *HttpServer) RegisterHandle(c string, a string,
|
func (this *HttpServer) RegisterHandle(c string, a string,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user