File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -355,8 +355,14 @@ def monitor_socket
355
355
356
356
begin
357
357
if ! dispatch_inbound_packet ( pkt )
358
- # Only requeue packets newer than the timeout
359
- if ( ::Time . now . to_i - pkt . created_at . to_i > PacketTimeout )
358
+ # Keep Packets in the receive queue until a handler is registered
359
+ # for them. Packets will live in the receive queue for up to
360
+ # PacketTimeout, after which they will be dropped.
361
+ #
362
+ # A common reason why there would not immediately be a handler for
363
+ # a received Packet is in channels, where a connection may
364
+ # open and receive data before anything has asked to read.
365
+ if ( ::Time . now . to_i - pkt . created_at . to_i < PacketTimeout )
360
366
incomplete << pkt
361
367
end
362
368
end
You can’t perform that action at this time.
0 commit comments