add:添加超时时间
This commit is contained in:
@@ -110,7 +110,7 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
||||
socket = new Socket();
|
||||
socket.connect(socketAddress, 2 * 1000);
|
||||
socket.setKeepAlive(true);//长链接
|
||||
// s.setSoTimeout(1000* 60 * 10);//读取超时时间
|
||||
socket.setSoTimeout(30000);//读取超时时间
|
||||
dos = new DataOutputStream(socket.getOutputStream());
|
||||
dis = new DataInputStream(socket.getInputStream());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user