1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-08 05:57:03 +09:00

debug server fixes

This commit is contained in:
Sergey Cherepanov 2023-06-08 13:38:00 +02:00
parent f9cb0c2dbb
commit 85cf6b8332
No known key found for this signature in database
GPG key ID: 87F8EDE8FBDF637C

View file

@ -15,6 +15,10 @@ import (
const CName = "net.rpc.debugserver"
func New() DebugServer {
return &debugServer{}
}
type DebugServer interface {
app.ComponentRunnable
drpc.Mux
@ -46,7 +50,10 @@ func (d *debugServer) Name() (name string) {
}
func (d *debugServer) Run(ctx context.Context) (err error) {
lis, err := net.Listen("tpc", d.config.ListenAddr)
if d.config.ListenAddr == "" {
return
}
lis, err := net.Listen("tcp", d.config.ListenAddr)
if err != nil {
return
}