Merge pull request #24 from anyproto/fix-metrics
Peer addr in ctx + fix any-sync version
This commit is contained in:
commit
ff3fc68451
@ -89,7 +89,7 @@ func (app *App) VersionName() string {
|
|||||||
if app.versionName != "" {
|
if app.versionName != "" {
|
||||||
return app.versionName
|
return app.versionName
|
||||||
}
|
}
|
||||||
return AppName + ":" + GitSummary + "/any-sync:" + app.anySyncVersion
|
return AppName + ":" + GitSummary + "/any-sync:" + app.AnySyncVersion()
|
||||||
}
|
}
|
||||||
|
|
||||||
type Stat struct {
|
type Stat struct {
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package yamux
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"github.com/anyproto/any-sync/net/connutil"
|
"github.com/anyproto/any-sync/net/connutil"
|
||||||
|
"github.com/anyproto/any-sync/net/peer"
|
||||||
"github.com/anyproto/any-sync/net/transport"
|
"github.com/anyproto/any-sync/net/transport"
|
||||||
"github.com/hashicorp/yamux"
|
"github.com/hashicorp/yamux"
|
||||||
"net"
|
"net"
|
||||||
@ -10,6 +11,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func NewMultiConn(cctx context.Context, luConn *connutil.LastUsageConn, addr string, sess *yamux.Session) transport.MultiConn {
|
func NewMultiConn(cctx context.Context, luConn *connutil.LastUsageConn, addr string, sess *yamux.Session) transport.MultiConn {
|
||||||
|
cctx = peer.CtxWithPeerAddr(cctx, sess.RemoteAddr().String())
|
||||||
return &yamuxConn{
|
return &yamuxConn{
|
||||||
ctx: cctx,
|
ctx: cctx,
|
||||||
luConn: luConn,
|
luConn: luConn,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user