allow reconnects after disconnecting
This commit is contained in:
parent
7e23597351
commit
9747cc4ddc
@ -191,7 +191,6 @@ public final class SocketIOClient : NSObject, SocketEngineClient, SocketParsable
|
|||||||
DefaultSocketLogger.Logger.log("Disconnected: %@", type: logType, args: reason)
|
DefaultSocketLogger.Logger.log("Disconnected: %@", type: logType, args: reason)
|
||||||
|
|
||||||
status = .Disconnected
|
status = .Disconnected
|
||||||
reconnects = false
|
|
||||||
|
|
||||||
// Make sure the engine is actually dead.
|
// Make sure the engine is actually dead.
|
||||||
engine?.disconnect(reason)
|
engine?.disconnect(reason)
|
||||||
@ -205,7 +204,6 @@ public final class SocketIOClient : NSObject, SocketEngineClient, SocketParsable
|
|||||||
|
|
||||||
DefaultSocketLogger.Logger.log("Closing socket", type: logType)
|
DefaultSocketLogger.Logger.log("Closing socket", type: logType)
|
||||||
|
|
||||||
reconnects = false
|
|
||||||
didDisconnect("Disconnect")
|
didDisconnect("Disconnect")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -189,7 +189,7 @@ struct SocketPacket {
|
|||||||
|
|
||||||
// Helper method that looks for placeholders
|
// Helper method that looks for placeholders
|
||||||
// If object is a collection it will recurse
|
// If object is a collection it will recurse
|
||||||
// Returns the object if it is not a placeholder string or the corresponding
|
// Returns the object if it is not a placeholder or the corresponding
|
||||||
// binary data
|
// binary data
|
||||||
private func _fillInPlaceholders(object: AnyObject) -> AnyObject {
|
private func _fillInPlaceholders(object: AnyObject) -> AnyObject {
|
||||||
switch object {
|
switch object {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user