PIEthernet on error close disconnect
This commit is contained in:
@@ -205,6 +205,7 @@ void PIEthernet::init() {
|
||||
sock_s = sock;
|
||||
if (sock == -1 || sock_s == -1) {
|
||||
piCoutObj << "Can`t create socket," << ethErrorString();
|
||||
connected_ = connecting_ = opened_ = false;
|
||||
return;
|
||||
}
|
||||
applyParameters();
|
||||
@@ -897,7 +898,7 @@ void PIEthernet::server_func(void * eth) {
|
||||
return;
|
||||
}
|
||||
if (ce->debug()) piCout << "[PIEthernet] Can`t accept new connection," << ethErrorString();
|
||||
piMSleep(10);
|
||||
piMSleep(50);
|
||||
return;
|
||||
}
|
||||
PIString ip = PIStringAscii(inet_ntoa(client_addr.sin_addr));
|
||||
|
||||
Reference in New Issue
Block a user