Skip to content

Commit 88b1eb1

Browse files
committed
going to remove close()
1 parent 67f47ad commit 88b1eb1

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

Source/SocketIOClient.swift

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -125,16 +125,9 @@ public final class SocketIOClient: NSObject, SocketEngineClient, SocketParsable
125125
reconnectTimer = nil
126126
}
127127

128-
/**
129-
Closes the socket. Only reopen the same socket if you know what you're doing.
130-
Will turn off automatic reconnects.
131-
Pass true to fast if you're closing from a background task
132-
*/
128+
@available(*, deprecated=6.0)
133129
public func close() {
134-
DefaultSocketLogger.Logger.log("Closing socket", type: logType)
135-
136-
reconnects = false
137-
didDisconnect("Closed")
130+
disconnect()
138131
}
139132

140133
/**
@@ -228,10 +221,14 @@ public final class SocketIOClient: NSObject, SocketEngineClient, SocketParsable
228221
}
229222

230223
/**
231-
Same as close
224+
Closes the socket. Only reopen the same socket if you know what you're doing.
225+
Will turn off automatic reconnects.
232226
*/
233227
public func disconnect() {
234-
close()
228+
DefaultSocketLogger.Logger.log("Closing socket", type: logType)
229+
230+
reconnects = false
231+
didDisconnect("Closed")
235232
}
236233

237234
/**

0 commit comments

Comments
 (0)