Skip to content

Commit

Permalink
Merge branch 'fix/app2-router2-tests' of https://github.com/Darkren/s…
Browse files Browse the repository at this point in the history
…kywire-mainnet into fix/adapt-to-services
  • Loading branch information
Darkren committed Nov 29, 2019
2 parents 71c8119 + 17f67b9 commit 0eea49d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions pkg/app/appnet/skywire_networker.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ func (r *SkywireNetworker) serve(ctx context.Context) error {

// serveRG passes accepted router group to the corresponding listener.
func (r *SkywireNetworker) serveRG(rg *router.RouteGroup) {
// TODO: local? remote? decide on this
localAddr, ok := rg.RemoteAddr().(routing.Addr)
localAddr, ok := rg.LocalAddr().(routing.Addr)
if !ok {
r.closeRG(rg)
r.log.Error("wrong type of addr in accepted conn")
Expand Down
4 changes: 2 additions & 2 deletions pkg/router/route_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,11 @@ func (r *RouteGroup) Close() error {
}

func (r *RouteGroup) LocalAddr() net.Addr {
return r.desc.Src()
return r.desc.Dst()
}

func (r *RouteGroup) RemoteAddr() net.Addr {
return r.desc.Dst()
return r.desc.Src()
}

// https://golang.org/src/internal/poll/fd_plan9.go#L103
Expand Down

0 comments on commit 0eea49d

Please sign in to comment.