Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
31d7f030
Commit
31d7f030
authored
Oct 11, 2015
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update go-peerstream dependency
License: MIT Signed-off-by:
Jeromy
<
jeromyj@gmail.com
>
parent
fef7030c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
Godeps/Godeps.json
Godeps/Godeps.json
+1
-1
Godeps/_workspace/src/github.com/jbenet/go-peerstream/conn.go
...ps/_workspace/src/github.com/jbenet/go-peerstream/conn.go
+11
-0
No files found.
Godeps/Godeps.json
View file @
31d7f030
...
...
@@ -196,7 +196,7 @@
},
{
"ImportPath"
:
"github.com/jbenet/go-peerstream"
,
"Rev"
:
"
cfdc29a19c1a209d548670f5c33c5cda2e040143
"
"Rev"
:
"
f90119e97e8be7b2bdd5e598067b0dc44df63381
"
},
{
"ImportPath"
:
"github.com/jbenet/go-random"
,
...
...
Godeps/_workspace/src/github.com/jbenet/go-peerstream/conn.go
View file @
31d7f030
...
...
@@ -44,6 +44,9 @@ type Conn struct {
streams
map
[
*
Stream
]
struct
{}
streamLock
sync
.
RWMutex
closed
bool
closeLock
sync
.
Mutex
}
func
newConn
(
nconn
net
.
Conn
,
tconn
smux
.
Conn
,
s
*
Swarm
)
*
Conn
{
...
...
@@ -114,6 +117,14 @@ func (c *Conn) Streams() []*Stream {
// Close closes this connection
func
(
c
*
Conn
)
Close
()
error
{
c
.
closeLock
.
Lock
()
defer
c
.
closeLock
.
Unlock
()
if
c
.
closed
{
return
nil
}
c
.
closed
=
true
// close streams
streams
:=
c
.
Streams
()
for
_
,
s
:=
range
streams
{
...
...
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