Revert "Use Drain() to unsuscribe or close connection"

This reverts commit 4d5859307ddbcc3c6af907ba0d0fac395b466836.
This commit is contained in:
magodo 2019-05-15 14:39:06 +08:00 committed by Vasiliy Tolstov
parent e2254ba411
commit 20453c885d

View File

@ -56,7 +56,7 @@ func (n *subscriber) Topic() string {
}
func (n *subscriber) Unsubscribe() error {
return n.s.Drain()
return n.s.Unsubscribe()
}
func (n *nbroker) Address() string {
@ -121,7 +121,7 @@ func (n *nbroker) Connect() error {
func (n *nbroker) Disconnect() error {
n.RLock()
n.conn.Drain()
n.conn.Close()
n.RUnlock()
return nil
}