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

Don't allow EINVAL to raise during SSL addr check

Closes #1564

Co-authored-by: hahmed <haroon.ahmed25@gmail.com>
This commit is contained in:
Nate Berkopec 2019-10-07 16:03:05 +02:00
parent 895722ddc2
commit 70e381d853
No known key found for this signature in database
GPG key ID: BDD7A4B8E43906A6

View file

@ -237,7 +237,8 @@ module Puma
ssl_socket = c.io
begin
addr = ssl_socket.peeraddr.last
rescue IOError
# EINVAL can happen when browser closes socket w/security exception
rescue IOError, Errno::EINVAL
addr = "<unknown>"
end