Merge pull request #23 from kevin96666/issue-22
SubscribeHandler not working with NonVerbose mode
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user