fixes for deno compatibility#387
Conversation
901144b to
36e22ad
Compare
guybedford
left a comment
There was a problem hiding this comment.
I'd be happy to land this with the suggested changes.
| return result; | ||
| }; | ||
| worker.unref(); | ||
| // worker.unref(); |
There was a problem hiding this comment.
| // worker.unref(); | |
| if (worker.unref) worker.unref(); |
There was a problem hiding this comment.
yes -- that's a much nicer solution! :)
Nevertheless, I think, it's not enough!
The timeouts in the CI pipeline are most likely caused by hanging processes affected by this particular change resp. broken termination of workers. :(
We have to check for active event listeners or timers...
| registerIncomingHttpHandler, | ||
| } from "../io/worker-io.js"; | ||
| import { validateHeaderName, validateHeaderValue } from "node:http"; | ||
| // import { validateHeaderName, validateHeaderValue } from "node:http"; |
There was a problem hiding this comment.
| // import { validateHeaderName, validateHeaderValue } from "node:http"; | |
| import * as http from "node:http"; | |
| const { validateHeaderName = () => {}, validateHeaderValue = () => {} } = http; |
There was a problem hiding this comment.
That's also a very nice improvement!
I just committed both changes, but it still needs a lot more of additional testing and rework.
3b81e72 to
04b9bff
Compare
|
Thanks for working on this. Let's at least land for now, we can always improve later. |
Yes -- that's a good interim solution, because the merged changes seem to do no harm to already existing use cases and test routines. I just waited, because I could isolate the non-termination issue as another Thanks for all your help! It's really a pleasure to collaborate with you! |
Just a first draft PR to feed the CI pipeline, because local testing doesn't work on my machine.
Fixes: #385
Warning! -- there are important parts missing/untested!
validateHeaderNameandvalidateHeaderValueare temporary replaced by dummy entries.This should be better fixed on the
denoside (see: missing reexport ofvalidateHeaderNameandvalidateHeaderValueinnode:httpdenoland/deno#22614).The
worker_thread.unref()case is still uttery unsolved and just temporary removed.