Skip to content

Commit

Permalink
fix: in airplane mode on iOS we can't lookup for the host
Browse files Browse the repository at this point in the history
Signed-off-by: Sacha Froment <sfroment42@gmail.com>
  • Loading branch information
sfroment committed Jan 2, 2019
1 parent 38a77a5 commit 9564064
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions core/manager/account/options.go
Expand Up @@ -21,7 +21,7 @@ import (
gqlhandler "github.com/99designs/gqlgen/handler"
"github.com/gorilla/websocket"
grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
"github.com/grpc-ecosystem/go-grpc-middleware/logging/zap"
grpc_zap "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap"
grpc_recovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery"
grpc_ctxtags "github.com/grpc-ecosystem/go-grpc-middleware/tags"
grpc_ot "github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing"
Expand Down Expand Up @@ -91,9 +91,16 @@ func WithInitOnly() NewOption {

func WithJaegerAddrName(addr string, name string) NewOption {
return func(a *Account) error {
var err error
a.tracer, a.tracingCloser, err = jaeger.InitTracer(addr, name)
return err
go func() {
re:
var err error
a.tracer, a.tracingCloser, err = jaeger.InitTracer(addr, name)
if err != nil {
logger().Error("jaeger init error", zap.Error(err))
goto re
}
}()
return nil
}
}

Expand Down

0 comments on commit 9564064

Please sign in to comment.