Fixed issue in DAS too

This commit is contained in:
Pinga 2023-11-02 12:48:39 +02:00
parent 76ec107f71
commit b906febeeb

View file

@ -25,13 +25,6 @@ $server->set([
'package_eof' => "\r\n" 'package_eof' => "\r\n"
]); ]);
// Register a callback to handle incoming connections
$server->on('connect', function ($server, $fd) {
echo "Client connected: {$fd}\r\n";
});
// Register a callback to handle incoming requests
$server->on('receive', function ($server, $fd, $reactorId, $data) {
// Connect to the database // Connect to the database
try { try {
$c = require_once 'config.php'; $c = require_once 'config.php';
@ -42,6 +35,14 @@ $server->on('receive', function ($server, $fd, $reactorId, $data) {
$server->close($fd); $server->close($fd);
} }
// Register a callback to handle incoming connections
$server->on('connect', function ($server, $fd) {
echo "Client connected: {$fd}\r\n";
});
// Register a callback to handle incoming requests
$server->on('receive', function ($server, $fd, $reactorId, $data) use ($c, $pdo) {
// Validate and sanitize the domain name // Validate and sanitize the domain name
$domain = trim($data); $domain = trim($data);
if (!$domain) { if (!$domain) {