Skip to content

Commit

Permalink
回调一次连接成功
Browse files Browse the repository at this point in the history
  • Loading branch information
ZyElite committed Sep 29, 2018
1 parent 90655bc commit b3fb2d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions socket/src/main/java/com/zy/socket/SocketClient.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.zy.socketclient.socket

import com.zy.socket.imp.SocketConfigImp
import com.zy.socketclient.socket.SocketPacketConfig.getDefaultHeadPacket
import com.zy.socketclient.socket.callback.SocketResponse
import com.zy.socketclient.socket.utils.SocketHelp.byteMerger
Expand Down Expand Up @@ -68,7 +69,6 @@ object SocketClient {
.map { socket?.isConnected ?: false }
.doOnNext {
if (it) {
result?.onConnected()
sendThread = Thread(SendThread())
sendThread?.start()
receiveThread = Thread(ReceiveThread())
Expand All @@ -82,7 +82,7 @@ object SocketClient {
if (t) {
result?.onConnected()
//发送心跳
// SocketConfigImp.Heartbeat()
SocketConfigImp.Heartbeat()
disposable?.dispose()
}
}
Expand Down

0 comments on commit b3fb2d4

Please sign in to comment.