Skip to content

Commit 7efc7b7

Browse files
dmorrowhamchapman
authored andcommitted
Update PusherConnection.swift
1 parent 73af7c7 commit 7efc7b7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Sources/PusherConnection.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,15 @@ public typealias PusherEventJSON = [String: AnyObject]
176176
self.channels.remove(name: channelName)
177177
}
178178
}
179+
180+
/**
181+
Unsubscribes from all PusherChannels
182+
*/
183+
internal func unsubscribeAll() {
184+
for (_, channel) in channels.channels {
185+
pusher.unsubscribe(channel.name)
186+
}
187+
}
179188

180189
/**
181190
Either writes a string directly to the websocket with the given event name

0 commit comments

Comments
 (0)