Skip to content

Commit

Permalink
webserver: print error when macgeiger isnt running
Browse files Browse the repository at this point in the history
  • Loading branch information
rofl0r committed Feb 7, 2018
1 parent c5a8474 commit b1e15b4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions httpsrv.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,14 @@
$wifis = Hash.new
$gt_socket = nil
def wifi_gather
socket = TCPSocket.new 'localhost', $macgeigerport
$gt_socket = socket
begin
socket = TCPSocket.new 'localhost', $macgeigerport
$gt_socket = socket
rescue Errno::EADDRNOTAVAIL => e
puts e.message
puts "maybe you need to start macgeiger first?"
exit(1)
end
out = false
loop do
begin
Expand Down

0 comments on commit b1e15b4

Please sign in to comment.