cmd, node, rpc: move websockets into node, break singleton

This commit is contained in:
Péter Szilágyi
2016-02-05 15:08:48 +02:00
parent a13bc9d7a1
commit 7486904b92
11 changed files with 194 additions and 292 deletions

View File

@@ -239,6 +239,9 @@ func Dial(address string) (*PipeConn, error) {
for {
conn, err := dial(address, nmpwait_wait_forever)
if err == nil {
// Ugly hack working around some async connectivity issues
time.Sleep(100 * time.Millisecond)
return conn, nil
}
if isPipeNotReady(err) {
@@ -360,6 +363,9 @@ func Listen(address string) (*PipeListener, error) {
if err != nil {
return nil, err
}
// Ugly hack working around some async connectivity issues
time.Sleep(100 * time.Millisecond)
return &PipeListener{
addr: PipeAddr(address),
handle: handle,