Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sidecar
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
link33
sidecar
Commits
99fb481c
Commit
99fb481c
authored
Dec 21, 2021
by
suyanlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed RegisterConnectHandler function
parent
5eefc718
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
handler.go
internal/peermgr/handler.go
+5
-5
No files found.
internal/peermgr/handler.go
View file @
99fb481c
...
@@ -42,9 +42,9 @@ func (swarm *Swarm) registerMsgHandler(messageType pb.Message_Type, handler inte
...
@@ -42,9 +42,9 @@ func (swarm *Swarm) registerMsgHandler(messageType pb.Message_Type, handler inte
}
}
func
(
swarm
*
Swarm
)
RegisterConnectHandler
(
handler
ConnectHandler
)
error
{
func
(
swarm
*
Swarm
)
RegisterConnectHandler
(
handler
ConnectHandler
)
error
{
//
swarm.lock.Lock()
swarm
.
lock
.
Lock
()
//
defer swarm.lock.Unlock()
defer
swarm
.
lock
.
Unlock
()
//
swarm.connectHandlers = append(swarm.connectHandlers, handler)
swarm
.
connectHandlers
=
append
(
swarm
.
connectHandlers
,
handler
)
//
return nil
return
nil
panic
(
"Unimplemented!"
)
//
panic("Unimplemented!")
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment