From ec2aa703a371ab364876c6ef3efdceeef7f0f9df Mon Sep 17 00:00:00 2001 From: Erik Date: Sun, 17 Jan 2016 10:30:34 -0500 Subject: [PATCH] Send close reason to engine --- Source/SocketIOClient.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/SocketIOClient.swift b/Source/SocketIOClient.swift index 623c9e4..cbcc515 100644 --- a/Source/SocketIOClient.swift +++ b/Source/SocketIOClient.swift @@ -215,19 +215,19 @@ public final class SocketIOClient: NSObject, SocketEngineClient, SocketParsable reconnects = false // Make sure the engine is actually dead. - engine?.close("Client closed") + engine?.close(reason) handleEvent("disconnect", data: [reason], isInternalMessage: true) } /** - Closes the socket. Only reopen the same socket if you know what you're doing. + Disconnects the socket. Only reconnect the same socket if you know what you're doing. Will turn off automatic reconnects. */ public func disconnect() { DefaultSocketLogger.Logger.log("Closing socket", type: logType) reconnects = false - didDisconnect("Closed") + didDisconnect("Disconnect") } /**