Skip to content

Commit ec2aa70

Browse files
committed
Send close reason to engine
1 parent c211ab1 commit ec2aa70

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Source/SocketIOClient.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,19 +215,19 @@ public final class SocketIOClient: NSObject, SocketEngineClient, SocketParsable
215215
reconnects = false
216216

217217
// Make sure the engine is actually dead.
218-
engine?.close("Client closed")
218+
engine?.close(reason)
219219
handleEvent("disconnect", data: [reason], isInternalMessage: true)
220220
}
221221

222222
/**
223-
Closes the socket. Only reopen the same socket if you know what you're doing.
223+
Disconnects the socket. Only reconnect the same socket if you know what you're doing.
224224
Will turn off automatic reconnects.
225225
*/
226226
public func disconnect() {
227227
DefaultSocketLogger.Logger.log("Closing socket", type: logType)
228228

229229
reconnects = false
230-
didDisconnect("Closed")
230+
didDisconnect("Disconnect")
231231
}
232232

233233
/**

0 commit comments

Comments
 (0)