mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Bail if read_nonblock returns nil. Fixes #1502
The code to perform the wait checking incorrectly assumed that data would return a symbol OR a String. It also returns nil if the socket has been closed. We must therefore deal with that nil by returning nothing.
This commit is contained in:
parent
9369a9fee0
commit
acb709b7b7
1 changed files with 2 additions and 0 deletions
|
@ -58,6 +58,8 @@ module Puma
|
|||
else
|
||||
IO.select(nil, [@socket.to_io])
|
||||
end
|
||||
elsif !data
|
||||
return nil
|
||||
else
|
||||
break
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue