Commit e6850a02 authored by OptimismBot's avatar OptimismBot Committed by GitHub

Merge pull request #5943 from ethereum-optimism/willc/api-listen-fix

fix(indexer): return listen error in api
parents 0d1545d9 f4cc4e58
...@@ -2,7 +2,6 @@ package api ...@@ -2,7 +2,6 @@ package api
import ( import (
"encoding/json" "encoding/json"
"log"
"net/http" "net/http"
"github.com/ethereum-optimism/optimism/indexer/database" "github.com/ethereum-optimism/optimism/indexer/database"
...@@ -101,9 +100,6 @@ func NewApi(bv database.BridgeView) *Api { ...@@ -101,9 +100,6 @@ func NewApi(bv database.BridgeView) *Api {
} }
func (a *Api) Listen(port string) { func (a *Api) Listen(port string) error {
err := http.ListenAndServe(port, a.Router) return http.ListenAndServe(port, a.Router)
if err != nil {
log.Fatal("Http server failed to start listening", err)
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment