Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
30a3b811
Commit
30a3b811
authored
Aug 31, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
e1a3677f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
41 deletions
+2
-41
go/neo/connection.go
go/neo/connection.go
+2
-41
No files found.
go/neo/connection.go
View file @
30a3b811
...
...
@@ -244,7 +244,6 @@ loop:
// conn into .acceptq - shutting it down will send the error to peer.
conn
.
shutdownRX
(
errConnRefused
)
// XXX vvv -> better conn.Close() ?
link
.
connMu
.
Lock
()
delete
(
link
.
connTab
,
conn
.
connId
)
link
.
connMu
.
Unlock
()
...
...
@@ -542,31 +541,12 @@ func (nl *NodeLink) serveRecv() {
if
connId
%
2
==
nl
.
nextConnId
%
2
{
tmpclosed
=
true
delete
(
nl
.
connTab
,
conn
.
connId
)
//errTempDown = errConnClosed
// message with connid for a stream initiated by peer
// it will be considered to be accepted (not if .axdown)
}
else
{
/*
if nl.acceptq == nil { // XXX != nil anymore
errTempDown = errConnRefused
} else {
// we are accepting new incoming connection
accept = true
}
*/
accept
=
true
}
// XXX cleanup vvv ^^^
/*
// delete temporary conn from .connTab - this way the
// connection will be automatically garbage-collected
// after its final use.
if !accept {
delete(nl.connTab, conn.connId)
}
*/
}
nl
.
connMu
.
Unlock
()
...
...
@@ -611,6 +591,7 @@ func (nl *NodeLink) serveRecv() {
}
// this packet established new connection - try to accept it
if
accept
{
// don't even try `link.acceptq <- ...` if link.axdown is ready
// ( else since select is picking random ready variant Accept/serveRecv
...
...
@@ -642,26 +623,6 @@ func (nl *NodeLink) serveRecv() {
delete
(
nl
.
connTab
,
conn
.
connId
)
nl
.
connMu
.
Unlock
()
}
/*
select {
case <-nl.down:
// Accept and loop calling it can exit if shutdown was requested
// if so we are also exiting
// make sure not to leave rx error as nil
nl.errMu.Lock()
nl.errRecv = ErrLinkDown
nl.errMu.Unlock()
return
case nl.acceptq <- conn:
// ok
}
*/
}
}
}
...
...
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