Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dfss
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
7
Issues
7
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mpcs
dfss
Commits
1868373b
Commit
1868373b
authored
May 24, 2016
by
Richer Maximilien
Committed by
Loïck Bonniot
May 24, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[c] Add net default timeout
parent
7e697f8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
dfssc/sign/starter.go
dfssc/sign/starter.go
+4
-1
No files found.
dfssc/sign/starter.go
View file @
1868373b
...
...
@@ -5,6 +5,7 @@ import (
"fmt"
"strconv"
"sync"
"time"
"dfss"
cAPI
"dfss/dfssc/api"
...
...
@@ -85,6 +86,8 @@ func NewSignatureManager(passphrase string, c *contract.JSON) (*SignatureManager
m
.
mail
=
m
.
auth
.
Cert
.
Subject
.
CommonName
dAPI
.
SetIdentifier
(
m
.
mail
)
net
.
DefaultTimeout
=
viper
.
GetDuration
(
"timeout"
)
m
.
cServer
=
m
.
GetServer
()
go
func
()
{
_
=
net
.
Listen
(
"0.0.0.0:"
+
strconv
.
Itoa
(
viper
.
GetInt
(
"local_port"
)),
m
.
cServer
)
}()
...
...
@@ -234,7 +237,7 @@ func (m *SignatureManager) addPeer(user *pAPI.User) (ready bool, err error) {
// SendReadySign sends the READY signal to the platform, and wait (potentially a long time) for START signal.
func
(
m
*
SignatureManager
)
SendReadySign
()
(
signatureUUID
string
,
err
error
)
{
ctx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
10
*
viper
.
GetDuration
(
"timeout"
)
)
ctx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
10
*
time
.
Minute
)
defer
cancel
()
c
:=
make
(
chan
*
pAPI
.
LaunchSignature
)
...
...
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