aboutsummaryrefslogtreecommitdiff
path: root/connector/external/external.go
diff options
context:
space:
mode:
Diffstat (limited to 'connector/external/external.go')
-rw-r--r--connector/external/external.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/connector/external/external.go b/connector/external/external.go
index 26f3c40..741802c 100644
--- a/connector/external/external.go
+++ b/connector/external/external.go
@@ -162,7 +162,7 @@ func (ext *External) setupProc() error {
}
func (ext *External) restartLoop(generation int) {
- for {
+ for i := 0; i < 2; i++ {
if ext.proc == nil {
break
}
@@ -178,6 +178,7 @@ func (ext *External) restartLoop(generation int) {
break
}
}
+ log.Warnf("More than 3 attempts (%s); abandonning.", ext.command)
}
func (m *extMessageWithData) UnmarshalJSON(jj []byte) error {
@@ -294,7 +295,7 @@ func (ext *External) cmd(msg extMessage, data interface{}) (*extMessageWithData,
} else {
return rep, nil
}
- case <-time.After(5 * time.Second):
+ case <-time.After(30 * time.Second):
return nil, fmt.Errorf("(%s) timeout", msg.MsgType)
}
}
@@ -379,7 +380,7 @@ func (ext *External) Join(room RoomID) error {
func (ext *External) Invite(user UserID, room RoomID) error {
_, err := ext.cmd(extMessage{
- MsgType: LEAVE,
+ MsgType: INVITE,
User: user,
Room: room,
}, nil)