Fix the build on travis.
This commit is contained in:
parent
afbefd1e02
commit
0306863d71
|
@ -80,7 +80,7 @@ GEM
|
|||
diff-lcs (1.3)
|
||||
discourse-qunit-rails (0.0.9)
|
||||
railties
|
||||
discourse_image_optim (0.24.4)
|
||||
discourse_image_optim (0.24.5)
|
||||
exifr (~> 1.2, >= 1.2.2)
|
||||
fspath (~> 3.0)
|
||||
image_size (~> 1.5)
|
||||
|
|
|
@ -16,7 +16,8 @@ class SocketServer
|
|||
end
|
||||
|
||||
def stop
|
||||
@server.close if @server
|
||||
@server&.close rescue nil
|
||||
FileUtils.rm_f(@socket_path)
|
||||
@server = nil
|
||||
@blk = nil
|
||||
end
|
||||
|
@ -26,10 +27,15 @@ class SocketServer
|
|||
def new_accept_thread
|
||||
server = @server
|
||||
Thread.new do
|
||||
begin
|
||||
done = false
|
||||
while !done
|
||||
done = !accept_connection(server)
|
||||
end
|
||||
ensure
|
||||
self.stop
|
||||
Rails.logger.info("Cleaned up socket server at #{@socket_path}")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue