Skip to content

Commit

Permalink
Merge pull request #73 from ianks/update-on-conn
Browse files Browse the repository at this point in the history
Send content when connection is established on ws
  • Loading branch information
ianks committed Feb 20, 2015
2 parents 4b734a8 + 6995fb2 commit ec8ec6e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/octodown/renderer/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ def body

def register_listener
Octodown::Support::Services::Riposter.call file do
ws.send render_md
md = render_md
ws.on(:open) { ws.send md }
ws.send md

puts "Reloading #{file.path}..."
end
end
Expand Down

0 comments on commit ec8ec6e

Please sign in to comment.