1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Close file stream when reading pid from pidfile (#2048)

* close file stream when reading pid from pidfile

* add changelog
This commit is contained in:
Haroon Ahmed 2019-10-21 13:55:33 +01:00 committed by Nate Berkopec
parent c379424c7b
commit 14782fd0b6
2 changed files with 2 additions and 1 deletions

View file

@ -8,6 +8,7 @@
* Bugfixes
* Fix Errno::EINVAL when SSL is enabled and browser rejects cert (#1564)
* Fix pumactl defaulting puma to development if an environment was not specified (#2035)
* Fix closing file stream when reading pid from pidfile (#2048)
## 4.2.1 / 2019-10-07

View file

@ -132,7 +132,7 @@ module Puma
@pid = sf.pid
elsif @pidfile
# get pid from pid_file
@pid = File.open(@pidfile).gets.to_i
File.open(@pidfile) { |f| @pid = f.read.to_i }
end
end