guzba / mummy

An HTTP and WebSocket server for Nim that returns to the ancient ways of threads.
MIT License
274 stars 10 forks source link

Enable listening with IPv6 or IPv4 (non-Windows only) #48

Closed finitemonkey closed 1 year ago

finitemonkey commented 1 year ago

This PR allows listening on an IPv6 address except on Windows, which it forces to fallback to IPv4.

This is to cover the case when the user specifies "localhost", which will likely detect and try to use IPv6, but for reasons yet to be determined, does not work on Windows (causing the server to be unresponsive).

It is #39 with a workaround due to lack of time/familiarity-with-Windows to fix the actual issue on Windows.

guzba commented 1 year ago

Thanks for preparing this. All good on skipping the Windows behavior trouble. Will be tagging this in my next release with some other stuff I'm working on.

guzba commented 1 year ago

This has been tagged in release 0.2.15

finitemonkey commented 1 year ago

Thanks, that's great! I'd still like to know what the problem is on Windows, though! I doubt I'll find the time/motivation to look at it again as I don't use Windows for anything but if I do and find out, I'll make a PR with the fix.

If any future Windows-y developer finds this and fixes it, let me know what the issue was! :-)