Skip to content

Commit

Permalink
Merge pull request #341 from linkernetworks/johnlin/timeout
Browse files Browse the repository at this point in the history
[Hot-fix] grpc timeout for 45 seconds
  • Loading branch information
John-Lin authored Oct 5, 2018
2 parents de3dfd4 + 8aefe01 commit f0de1bd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/networkcontroller/network_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import (
"google.golang.org/grpc"
)

// GRPC_TIMEOUT for the GRPC client
const GRPC_TIMEOUT = 45

// DEFAULT_CONTROLLER_PORT set the default port as 50051
const DEFAULT_CONTROLLER_PORT = "50051"

Expand All @@ -26,7 +29,7 @@ func New(serverAddress string) (*NetworkController, error) {
return nil, err
}

ctx, _ := context.WithTimeout(context.Background(), 10*time.Second)
ctx, _ := context.WithTimeout(context.Background(), GRPC_TIMEOUT*time.Second)

return &NetworkController{
ClientCtl: pb.NewNetworkControlClient(conn),
Expand Down

0 comments on commit f0de1bd

Please sign in to comment.