make sure client terminates on signal during ws connection set
MODIFY
go/src/github.com/xing/beetle/beetle.go
go/src/github.com/xing/beetle/beetle.go
@@ -146,6 +146,7 @@ func installSignalHandler() {
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
go func() {
<-c
+ logInfo("received TERM signal")
interrupted = true
signal.Stop(c)
}()

MODIFY
go/src/github.com/xing/beetle/client.go
go/src/github.com/xing/beetle/client.go
@@ -54,7 +54,8 @@ func (s *ClientState) ServerUrl() string {
func (s *ClientState) Connect() (err error) {
url := s.ServerUrl()
- logInfo("connecting to %s", url)
+ websocket.DefaultDialer.HandshakeTimeout = 5 * time.Second
+ logInfo("connecting to %s, timeout: %s", url, websocket.DefaultDialer.HandshakeTimeout)
s.ws, _, err = websocket.DefaultDialer.Dial(url, nil)
if err != nil {
return

make sure client terminates on signal during ws connection set