Merge pull request #44 from fraenkel/stale_reconnect

Let readLoop do the closeConnection magic on any error
This commit is contained in:
Derek Collison
2014-09-15 10:50:19 -07:00

View File

@@ -832,7 +832,6 @@ func (c *client) clearConnection() {
}
c.bw.Flush()
c.nc.Close()
c.nc = nil
}
func (c *client) typeString() string {
@@ -859,6 +858,7 @@ func (c *client) closeConnection() {
c.clearAuthTimer()
c.clearPingTimer()
c.clearConnection()
c.nc = nil
// Snapshot for use.
subs := c.subs.All()