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:
parent
f9cb0c2dbb
commit
85cf6b8332
1 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue