HubConnection.Disconnect() function (via autoreconnect abuse)
This commit is contained in:
parent
43db3a0d64
commit
3c4972d930
@ -195,6 +195,14 @@ func (this *HubConnection) processProtocolMessage(message string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *HubConnection) Disconnect() {
|
||||||
|
this.autoReconnect = false
|
||||||
|
if this.conn != nil {
|
||||||
|
this.conn.Close()
|
||||||
|
}
|
||||||
|
// A CONNECTIONSTATE_DISCONNECTED message will be emitted by the worker.
|
||||||
|
}
|
||||||
|
|
||||||
func (this *HubConnection) worker() {
|
func (this *HubConnection) worker() {
|
||||||
var fullBuffer string
|
var fullBuffer string
|
||||||
var err error = nil
|
var err error = nil
|
||||||
|
Loading…
Reference in New Issue
Block a user