Skip to content

Commit

Permalink
SD: returns ErrNoPaths if no paths were found
Browse files Browse the repository at this point in the history
  • Loading branch information
lukedirtwalker committed Oct 14, 2019
1 parent c865360 commit 5a1dfa4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions go/sciond/internal/fetcher/fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ func (f *fetcherHandler) GetPaths(ctx context.Context, req *sciond.PathReq,
if err != nil {
return f.buildSCIONDReply(nil, 0, sciond.ErrorInternal), err
}
if len(paths) == 0 {
return f.buildSCIONDReply(nil, req.MaxPaths, sciond.ErrorNoPaths), nil
}
return f.buildSCIONDReply(paths, req.MaxPaths, sciond.ErrorOk), nil
}

Expand Down

0 comments on commit 5a1dfa4

Please sign in to comment.