Skip to content

Commit 3639626

Browse files
committed
Fix tail returning 403 in distributed scenarios due to HTTP usage.
1 parent 2131a5c commit 3639626

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

client/api_log.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ func (c Client) tailBroadcast(ctx context.Context, dialer *pmtp.Dialer, u *pmtp.
9090
if peer.Me {
9191
host = u.Host
9292
}
93-
err := tail(ctx, dialer, u.TLS, host, to, out.SubWriter(peer.Host))
93+
err := tail(ctx, dialer, true, host, to, out.SubWriter(peer.Host))
9494
if err != nil {
9595
errs[i] = fmt.Errorf("host %s: %w", peer.Host, err)
9696
}

netx/local_dialer.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ func GetLocalDialerSocketCount() int64 {
2828
return localDialerSocketCount.Load()
2929
}
3030

31-
func NewTracedConn(conn net.Conn) *TracedConn {
31+
func NewTracedConn(conn net.Conn) net.Conn {
32+
if !DebugSocketCount {
33+
return conn
34+
}
3235
x := localDialerSocketCount.Add(1)
3336
if x&255 == 0 && x != 0 && DebugSocketCount {
3437
xlog.Info().Int64("n", x).Stringer("local", conn.LocalAddr()).Stringer("remote", conn.RemoteAddr()).Msg("Socket created")

service/svc_app.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ func (run *AppServer) spawnProcess(initialProcess bool) (err error) {
532532
// Allocate an IP address and create the upstream.
533533
var upstream *lb.Upstream
534534
if run.LoadBalancer != nil {
535-
const port = 70
535+
const port = 8080
536536
ip, err := SubnetAllocator().AllocateContext(pctx, port)
537537
if err != nil {
538538
return err

0 commit comments

Comments
 (0)