2
0

Merge pull request #23 from kevin96666/issue-22

SubscribeHandler not working with NonVerbose mode
This commit is contained in:
Lucas Löffel
2020-02-14 08:58:08 +01:00
committed by GitHub
+8 -9
View File
@@ -407,22 +407,21 @@ func (rc *RecConn) connect() {
if err == nil {
if !rc.getNonVerbose() {
log.Printf("Dial: connection was successfully established with %s\n", rc.url)
}
if !rc.hasSubscribeHandler() {
return
}
if rc.hasSubscribeHandler() {
if err := rc.SubscribeHandler(); err != nil {
log.Fatalf("Dial: connect handler failed with %s", err.Error())
}
log.Printf("Dial: connect handler was successfully established with %s\n", rc.url)
if rc.getKeepAliveTimeout() != 0 {
rc.keepAlive()
if !rc.getNonVerbose() {
log.Printf("Dial: connect handler was successfully established with %s\n", rc.url)
}
}
if rc.getKeepAliveTimeout() != 0 {
rc.keepAlive()
}
return
}