Revert "Use Drain()
to unsuscribe or close connection"
This reverts commit 4d5859307ddbcc3c6af907ba0d0fac395b466836.
This commit is contained in:
parent
e2254ba411
commit
20453c885d
4
nats.go
4
nats.go
@ -56,7 +56,7 @@ func (n *subscriber) Topic() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (n *subscriber) Unsubscribe() error {
|
func (n *subscriber) Unsubscribe() error {
|
||||||
return n.s.Drain()
|
return n.s.Unsubscribe()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (n *nbroker) Address() string {
|
func (n *nbroker) Address() string {
|
||||||
@ -121,7 +121,7 @@ func (n *nbroker) Connect() error {
|
|||||||
|
|
||||||
func (n *nbroker) Disconnect() error {
|
func (n *nbroker) Disconnect() error {
|
||||||
n.RLock()
|
n.RLock()
|
||||||
n.conn.Drain()
|
n.conn.Close()
|
||||||
n.RUnlock()
|
n.RUnlock()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user