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 err == nil {
|
||||||
if !rc.getNonVerbose() {
|
if !rc.getNonVerbose() {
|
||||||
log.Printf("Dial: connection was successfully established with %s\n", rc.url)
|
log.Printf("Dial: connection was successfully established with %s\n", rc.url)
|
||||||
|
}
|
||||||
|
|
||||||
if !rc.hasSubscribeHandler() {
|
if rc.hasSubscribeHandler() {
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := rc.SubscribeHandler(); err != nil {
|
if err := rc.SubscribeHandler(); err != nil {
|
||||||
log.Fatalf("Dial: connect handler failed with %s", err.Error())
|
log.Fatalf("Dial: connect handler failed with %s", err.Error())
|
||||||
}
|
}
|
||||||
|
if !rc.getNonVerbose() {
|
||||||
log.Printf("Dial: connect handler was successfully established with %s\n", rc.url)
|
log.Printf("Dial: connect handler was successfully established with %s\n", rc.url)
|
||||||
|
|
||||||
if rc.getKeepAliveTimeout() != 0 {
|
|
||||||
rc.keepAlive()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if rc.getKeepAliveTimeout() != 0 {
|
||||||
|
rc.keepAlive()
|
||||||
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user