Skip to content

Commit

Permalink
shutdown webrick on reload, fixes middleman#1430
Browse files Browse the repository at this point in the history
This fixes the bug referenced.
It may be somewhat broken, and perhaps this should be in unmount_instance.

Basically what is happening is that the ensure block in Webrick.start runs, setting @shutdown_pipe to nil, then it tries to remount with a broken @webrick. Im not sure shy the ensure block is running exactly though...
  • Loading branch information
nhemsley committed Mar 8, 2015
1 parent 7f2048b commit dd01b8c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions middleman-core/lib/middleman-core/preview_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ def reload
end

unmount_instance
@webrick.shutdown
@webrick = nil

mount_instance(app)

logger.info '== The Middleman has reloaded'
Expand Down

0 comments on commit dd01b8c

Please sign in to comment.