DCP: Prevent double deletion of runner

This commit is contained in:
Sebastian Serth
2021-10-31 01:03:07 +02:00
parent 6a902c41db
commit eaa06ee528
2 changed files with 2 additions and 1 deletions

View File

@ -135,6 +135,8 @@ class Runner::Connection
case @status
when :timeout
# The runner will destroyed. For the DockerContainerPool, this mechanism is necessary.
# However, it might not be required for Poseidon.
@strategy.destroy_at_management
@error = Runner::Error::ExecutionTimeout.new('Execution exceeded its time limit')
when :terminated_by_codeocean, :terminated_by_management

View File

@ -90,7 +90,6 @@ class Runner::Strategy::DockerContainerPool < Runner::Strategy
end
rescue Timeout::Error
socket.close(:timeout)
destroy_at_management
end
socket
end