mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
graphql: fix the panic of nil timer.Stop
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
4c7053baf1
commit
02490e137a
1 changed files with 3 additions and 1 deletions
|
|
@ -88,7 +88,9 @@ func (h handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
response := h.Schema.Exec(ctx, params.Query, params.OperationName, params.Variables)
|
||||
timer.Stop()
|
||||
if timer != nil {
|
||||
timer.Stop()
|
||||
}
|
||||
responded.Do(func() {
|
||||
responseJSON, err := json.Marshal(response)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue