Skip to content

Commit

Permalink
fix(Android): Fix server socket events not being delivered
Browse files Browse the repository at this point in the history
Fixes #54
  • Loading branch information
Rapsssito committed Jun 18, 2020
1 parent 560c7f4 commit 50e9b79
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import java.net.ServerSocket;
import java.net.Socket;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;

public final class TcpSocketServer extends TcpSocketClient {
private ServerSocket serverSocket;
Expand All @@ -29,8 +28,8 @@ protected Void doInBackground(Object[] objects) {
int clientId = getClientId();
TcpSocketClient socketClient = new TcpSocketClient(mReceiverListener, clientId, socket);
socketClients.put(clientId, socketClient);
socketClient.startListening();
mReceiverListener.onConnection(getId(), clientId, new InetSocketAddress(socket.getInetAddress(), socket.getPort()));
socketClient.startListening();
}
} catch (IOException e) {
if (!serverSocket.isClosed()) {
Expand Down

0 comments on commit 50e9b79

Please sign in to comment.