instance method
restart
Ruby on Rails edge
Since edgeSignature
restart()
No documentation comment.
Source
# File actioncable/lib/action_cable/server/base.rb, line 74
def restart
each_connection do |connection|
connection.close(reason: ActionCable::INTERNAL[:disconnect_reasons][:server_restart])
end
@mutex.synchronize do
# Drop the closed connections. remove_connection normally runs on the
# worker pool, which we halt below, so the entries would otherwise leak.
connections_map.clear
# Shutdown the heartbeat timer
@heartbeat_timer.shutdown if @heartbeat_timer
@heartbeat_timer = nil
# Shutdown the worker pool
@worker_pool.halt if @worker_pool
@worker_pool = nil
# Shutdown the executor
@executor.shutdown if @executor
@executor = nil
# Shutdown the pub/sub adapter
@pubsub.shutdown if @pubsub
@pubsub = nil
end
end
Defined in actioncable/lib/action_cable/server/base.rb line 74
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionCable::Server::ThreadedExecutor::Base