Merge branch 'master' into pisteampackerconfig
# Conflicts: # libs/client_server/piclientserver_server.cpp # libs/crypt/picrypt.cpp # libs/io_utils/pistreampacker.cpp # main.cpp
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "piclientserver_client.h"
|
||||
#include "piethernet.h"
|
||||
#include "pitranslator.h"
|
||||
|
||||
|
||||
PIClientServer::Server::Server() {
|
||||
@@ -29,13 +30,13 @@ PIClientServer::Server::Server() {
|
||||
CONNECTL(tcp_server, newConnection, [this](PIEthernet * c) {
|
||||
PIMutexLocker guard(clients_mutex);
|
||||
if (clients.size_s() >= max_clients) {
|
||||
piCout << "Server::newConnection overflow clients count";
|
||||
piCout << "Server::newConnection overflow clients count"_tr("PIClientServer");
|
||||
delete c;
|
||||
return;
|
||||
}
|
||||
auto sc = client_factory();
|
||||
if (!sc) {
|
||||
piCout << "ClientFactory returns nullptr!";
|
||||
piCout << "ClientFactory returns nullptr!"_tr("PIClientServer");
|
||||
return;
|
||||
}
|
||||
sc->createForServer(this, c);
|
||||
|
||||
Reference in New Issue
Block a user