Restart.txt is uploaded before the server connect file is uploaded to remote server

Wappler Version : 3.4
Operating System : mac / remote node

Expected behavior

When saving a server connect file, the trigger to restart the server (upload of restart.txt) is performed AFTER the server connect file is uploaded completely.

Actual behavior

The restart.txt is sent before the new file is ready

How to reproduce

Create a new Server Connect file within a node project.

The following output is produced:

Start upload for app/api/security/test.json
Uploading restart.txt to restart the NodeJS server ...
cd ok, cwd=/home/dev-01/domains/            
16 bytes transferred                                              
Uploaded /app/api/security/test.json successfully    

Open the server connect file in a browser:

{"status":"404","message":"/api/security/test not found."}

Restart the node server (I use PM2 restart )

The file runs properly.

This might be related to the double save that sometimes is needed due to code formatting.

Just save again and see if the upload goes well now.

Yes, saving twice, or restarting manually resolves.

Actually, I take that backÔÇŽI did another test.

With a simple Single login action, I changed the password and saved several times in a row. The new password was not valid until I restarted the node server.

@George Is this confirmed, or do you need some more examples/tests?

No we are all fine, will see if this get fixed when we fix the double save problem