Skip to content
Snippets Groups Projects
Commit f7cd4ef3 authored by echicken's avatar echicken :chicken:
Browse files

Create ip temp file immediately on connect.

parent c0980268
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -85,6 +85,12 @@ try {
log(LOG_DEBUG, "Connecting to " + TargetHostname + ":" + TargetPort);
if (FServerSocket.connect(TargetHostname, TargetPort)) {
ipFile = new File(system.temp_path + 'sbbs-ws-' + FServerSocket.local_port + '.ip');
if (ipFile.open('w')) {
ipFile.write(client.ip_address);
ipFile.close();
}
// Variables we'll use in the loop
var DoYield = true;
var ClientData = [];
......@@ -104,12 +110,6 @@ try {
FServerSocket.send(hapstr);
}
ipFile = new File(system.temp_path + 'sbbs-ws-' + FServerSocket.local_port + '.ip');
if (ipFile.open('w')) {
ipFile.write(client.ip_address);
ipFile.close();
}
// Loop while we're still connected on both ends
while ((client.socket.is_connected) && (FServerSocket.is_connected)) {
// Should we yield or not (default true, but disable if we had line activity)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment