Skip to content

Commit ccf0a4c

Browse files
Merge pull request #262 from netpoetica/master
fix async issue where same port is considered open
2 parents 660663d + 0a02b71 commit ccf0a4c

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

ElectronNET.Host/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ function startSocketApiBridge(port) {
9999
server.listen(port, 'localhost');
100100
server.on('listening', function () {
101101
console.log('Electron Socket started on port %s at %s', server.address().port, server.address().address);
102+
// Now that socket connection is established, we can guarantee port will not be open for portscanner
103+
startAspCoreBackend(port);
102104
});
103105

104-
startAspCoreBackend(port);
105-
106106
io.on('connection', (socket) => {
107107
global['electronsocket'] = socket;
108108
global['electronsocket'].setMaxListeners(0);

buildReleaseNuGetPackages.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
echo "Start building Electron.NET dev stack..."
2+
3+
echo "Restore & Build API"
4+
cd ElectronNET.API && \
5+
dotnet restore && \
6+
dotnet build --configuration Release --force /property:Version=5.22.12 && \
7+
dotnet pack /p:Version=5.22.12 --configuration Release --force --output "%~dp0artifacts";
8+
9+
cd ../;
10+
11+
echo "Restore & Build CLI"
12+
cd ElectronNET.CLI && \
13+
dotnet restore && \
14+
dotnet build --configuration Release --force /property:Version=5.22.12 && \
15+
dotnet pack /p:Version=5.22.12 --configuration Release --force --output "%~dp0artifacts";

0 commit comments

Comments
 (0)