Permalink
Browse files

workaround for avoiding morbo crashes on MS Windows

  • Loading branch information...
1 parent 1a0d0f1 commit 1aa37fcd8def9e474f0e4a79aefc0333ea12324c @kmx kmx committed Sep 17, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 script/morbo
View
@@ -37,6 +37,13 @@ These options are available:
working directory.
EOF
+if ($^O eq 'MSWin32') {
+ # morbo uses fork() which is on MS Windows emulated via threads
+ # however some pieces used by Mojo are not completely thread-safe
+ $ENV{MOJO_REACTOR} = 'Mojo::Reactor::Poll'; # avoid using Mojo::Reactor::EV
+ $ENV{MOJO_NO_TLS} or require IO::Socket::SSL; # workaround for RT #79685
+}
+
$ENV{MOJO_LISTEN} = join(',', @listen) if @listen;
require Mojo::Server::Morbo;
my $morbo = Mojo::Server::Morbo->new;

0 comments on commit 1aa37fc

Please sign in to comment.