Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
node-http-server
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Debian JavaScript Maintainers
node-http-server
Commits
dce12b2f
Commit
dce12b2f
authored
10 months ago
by
Bastien Roucariès
Browse files
Options
Downloads
Patches
Plain Diff
Avoid EINUSE
parent
1eb79b00
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
debian/changelog
+7
-0
7 additions, 0 deletions
debian/changelog
debian/patches/0006-Wait-until-server-is-closed-before-invoking-callback.patch
+30
-0
30 additions, 0 deletions
...ait-until-server-is-closed-before-invoking-callback.patch
debian/patches/series
+1
-0
1 addition, 0 deletions
debian/patches/series
with
38 additions
and
0 deletions
debian/changelog
+
7
−
0
View file @
dce12b2f
node-http-server (14.1.1+~cs3.14.34-3) unstable; urgency=medium
* Team upload
* Avoid EINUSE in autopkgtest
-- Bastien Roucariès <rouca@debian.org> Thu, 01 Aug 2024 18:57:12 +0000
node-http-server (14.1.1+~cs3.14.34-2) unstable; urgency=medium
* Team upload
...
...
This diff is collapsed.
Click to expand it.
debian/patches/0006-Wait-until-server-is-closed-before-invoking-callback.patch
0 → 100644
+
30
−
0
View file @
dce12b2f
From: sla89 <skullsplitter@die-optimisten.net>
Date: Thu, 1 Aug 2024 18:43:45 +0000
Subject: Wait until server is closed before invoking callback
Will avoid a EINUSE error
origin: https://github.com/http-party/node-portfinder/commit/394533f6164d1f44f0c8ea7bba5857b804928918.patch
bug: https://github.com/http-party/node-portfinder/issues/104
bug-pull-request: https://github.com/http-party/node-portfinder/pull/105
---
portfinder/lib/portfinder.js | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/portfinder/lib/portfinder.js b/portfinder/lib/portfinder.js
index e798f69..0c4fb17 100644
--- a/portfinder/lib/portfinder.js
+++ b/portfinder/lib/portfinder.js
@@ -39,8 +39,10 @@
internals.testPort = function(options, callback) {
debugTestPort("done w/ testPort(): OK", options.host, "port", options.port);
options.server.removeListener('error', onError);
- options.server.close();
- callback(null, options.port);
+ options.server.close(function () {
+ debugTestPort("done w/ testPort(): Server closed", options.host, "port", options.port);
+ callback(null, options.port);
+ });
}
function onError (err) {
This diff is collapsed.
Click to expand it.
debian/patches/series
+
1
−
0
View file @
dce12b2f
...
...
@@ -3,3 +3,4 @@ remove-unnecessary-shebang-line.patch
drop-secure-compare-dependency.patch
drop-url-join-dependency.patch
use-mime3.patch
0006-Wait-until-server-is-closed-before-invoking-callback.patch
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment