mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-21 20:13:06 +00:00
Only use a socket timeout when handshaking on the control stream.
This commit is contained in:
parent
ade061bf3c
commit
cc30752eb7
@ -64,7 +64,6 @@ public class ControlStream implements ConnectionStatusListener {
|
||||
public void initialize() throws IOException
|
||||
{
|
||||
s = new Socket();
|
||||
s.setSoTimeout(CONTROL_TIMEOUT);
|
||||
s.setTcpNoDelay(true);
|
||||
s.connect(new InetSocketAddress(host, PORT), CONTROL_TIMEOUT);
|
||||
in = s.getInputStream();
|
||||
@ -140,10 +139,16 @@ public class ControlStream implements ConnectionStatusListener {
|
||||
|
||||
public void start() throws IOException
|
||||
{
|
||||
// Use a finite timeout during the handshake process
|
||||
s.setSoTimeout(CONTROL_TIMEOUT);
|
||||
|
||||
sendConfig();
|
||||
pingPong();
|
||||
send1405AndGetResponse();
|
||||
|
||||
// Return to an infinte read timeout after the initial control handshake
|
||||
s.setSoTimeout(0);
|
||||
|
||||
heartbeatThread = new Thread() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user