Added warning, restart doesn't work together with fork
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Engine / HTTP / Restarter.pm
index 134e6be..0c73ebd 100644 (file)
@@ -11,6 +11,9 @@ sub run {
 
     $options ||= {};
 
+    die "Sorry, but 'restart' doesn't work together with 'fork'.\n"
+      if $options->{fork};
+
     # Setup restarter
     my $restarter;
     my $parent = $$;
@@ -49,7 +52,7 @@ sub run {
                     PeerAddr => $host,
                     PeerPort => $port
                   )
-                  or die "can't create client socket (is server running?): ",
+                  or die "Can't create client socket (is server running?): ",
                   $!;
 
                 # build the Kill request
@@ -59,7 +62,7 @@ sub run {
                 $req->protocol('HTTP/1.0');
 
                 $client->send( $req->as_string )
-                  or die "can't send restart instruction: ", $!;
+                  or die "Can't send restart instruction: ", $!;
                 $client->close();
                 exit;
             }