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
27f3493e
Commit
27f3493e
authored
Dec 19, 2016
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
ee71bd1a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
t/neo/connection.go
t/neo/connection.go
+4
-2
t/neo/connection_test.go
t/neo/connection_test.go
+4
-0
No files found.
t/neo/connection.go
View file @
27f3493e
...
...
@@ -100,8 +100,8 @@ const (
ConnServer
ConnRole
=
iota
// connection created as server
ConnClient
// connection created as client
// for testing:
do not spawn serveRecv & serveSend
connNoRecvSend
ConnRole
=
1
<<
16
// for testing:
connNoRecvSend
ConnRole
=
1
<<
16
// do not spawn serveRecv & serveSend
connFlagsMask
ConnRole
=
(
1
<<
32
-
1
)
<<
16
)
...
...
@@ -314,6 +314,7 @@ runloop:
case
txreq
:=
<-
nl
.
txreq
:
fmt
.
Printf
(
"%p
\t
(send) -> txreq
\n
"
,
nl
)
err
:=
nl
.
sendPkt
(
txreq
.
pkt
)
fmt
.
Printf
(
"%p
\t
(send) -> err: %v
\n
"
,
nl
,
err
)
if
err
!=
nil
{
// XXX also close whole nodeLink since tx framing now can be broken?
}
...
...
@@ -369,6 +370,7 @@ func (c *Conn) Recv() (*PktBuf, error) {
// worker for Close() & co
func
(
c
*
Conn
)
close
()
{
c
.
closeOnce
.
Do
(
func
()
{
fmt
.
Printf
(
"%p Conn.close
\n
"
,
c
)
close
(
c
.
closed
)
// XXX better just close c.rxq + ??? for tx
})
}
...
...
t/neo/connection_test.go
View file @
27f3493e
...
...
@@ -225,6 +225,10 @@ func TestNodeLink(t *testing.T) {
xwait
(
wg
)
// Close vs Send
println
(
"444.2"
)
//xclose(nl2) // so it does not receive what nl1 sends XXX wrong ->
//this will just make Send return error right after call
// TODO what is needed is nl2.serveRecv shutdown
c
=
nl1
.
NewConn
()
wg
=
WorkGroup
()
wg
.
Gox
(
func
()
{
...
...
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