山口と申します。

Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
C:\Users\0000910700>ruby --version
ruby 2.3.1p112 (2016-04-26 revision 54768) [x64-mingw32]

の環境で、

自作プログラム(DLNA DMSサーバーのフォルダー内のコンテンツをリスト表示)で、

あるフォルダ(コンテンツが200以下?)では、
問題なく動作するのですが、

あるフォルダ(コンテンツが200以上?)では、
C:/Ruby23-x64/lib/ruby/2.3.0/net/protocol.rb:140: `end of file reached' 
(EOFError)
...のようなエラーが表示され、
プログラムが終了してしまいます。

コンテンツのリスト取得時のデーター量の問題?なのかなと思っています。

エラー表示から、Web等で検索したところ、
http_start keep_alive を設定すれば回避できるのかも? 
と思っているのですが...
使用している gem easy_upnp のさらに、下の階層なので、対処方法がわからず
困っております。

正しい推測でしょうか?

そもそもの原因と、解決方法ご教示いただけますでしょうか?

以下、rdebug のログで、下部分が、エラーになる際のログです。

c:\yama\bin\UPnP>ruby -rdebug ListUpContentDirectory.rb
C:/Ruby23-x64/lib/ruby/2.3.0/x64-mingw32/continuation.so: warning: 
callcc is obsolete; use Fiber instead
Debug.rb
Emacs support available.

ListUpContentDirectory.rb:3:DEBUG=false
(rdb:1) b 121
Set breakpoint 1 at ListUpContentDirectory.rb:121
(rdb:1) c
HAP-Z1ES
HAP-Z1ES
uuid:00000000-0000-1010-8000-D8D43C1B2B3F
192.168.0.108

/>ls
Breakpoint 1, dir_exec at ListUpContentDirectory.rb:121
ListUpContentDirectory.rb:121:  ret = $dms_obj.contentdirectory.Browse(
folder,
(rdb:1) c
***** container *****
[ 0]:ジャンル
[ 1]:アーティスト
[ 2]:作曲者
[ 3]:アルバム
[ 4]:フォルダ
[ 5]:おまかせチャンネル
[ 6]:プレイリスト
[ 7]:お気に入り
[ 8]:トラック
Total item count in this directory: 0
/>cd 4
/フォルダ>ls
Breakpoint 1, dir_exec at ListUpContentDirectory.rb:121
ListUpContentDirectory.rb:121:  ret = $dms_obj.contentdirectory.Browse(
folder,
(rdb:1) c
***** container *****
[ 0]:HAP_Internal
Total item count in this directory: 0
/フォルダ>cd 0
/フォルダ/HAP_Internal>ls
Breakpoint 1, dir_exec at ListUpContentDirectory.rb:121
ListUpContentDirectory.rb:121:  ret = $dms_obj.contentdirectory.Browse(
folder,
(rdb:1) c
***** container *****
[ 0]:CSC_Long_Play
[ 1]:flat
[ 2]:NewAudio Test Contents
[ 3]:Sample Music
[ 4]:SQA_Problem_Contents
[ 5]:xNewAudio Test Contents
Total item count in this directory: 0
/フォルダ/HAP_Internal>cd 1
/フォルダ/HAP_Internal/flat>ls
Breakpoint 1, dir_exec at ListUpContentDirectory.rb:121
ListUpContentDirectory.rb:121:  ret = $dms_obj.contentdirectory.Browse(
folder,
(rdb:1) c
***** container *****
[ 0]:AAC
[ 1]:AIFF
[ 2]:ALAC
[ 3]:FLAC
[ 4]:MP3
[ 5]:WAV
Total item count in this directory: 0
/フォルダ/HAP_Internal/flat>cd 1
/フォルダ/HAP_Internal/flat/AIFF>ls
Breakpoint 1, dir_exec at ListUpContentDirectory.rb:121
ListUpContentDirectory.rb:121:  ret = $dms_obj.contentdirectory.Browse(
folder,
(rdb:1)c
5.1LPCM-352.8kHz-16bit_int-5.1ch.aiff
5.1LPCM-384kHz-16bit_int-51.ch.aiff
....
Shoot to Thrill-384kHz-16bit-[M]
Shoot to Thrill-384kHz-24bit-[M].aiff
Shoot to Thrill-384kHz-32bit-[M]
Total item count in this directory: 85
/フォルダ/HAP_Internal/flat/AIFF>cd ..
/フォルダ/HAP_Internal/flat/AAC>ls
Breakpoint 1, dir_exec at ListUpContentDirectory.rb:121
ListUpContentDirectory.rb:121:  ret = $dms_obj.contentdirectory.Browse(
folder,
(rdb:1) c
C:/Ruby23-x64/lib/ruby/2.3.0/net/protocol.rb:140: `end of file reached' 
(EOFError)
        from C:/Ruby23-x64/lib/ruby/2.3.0/net/http.rb:1407:in `request'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/httpi-2.4.2/lib/
httpi/adapter/net_http.rb:70:in `perform'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/httpi-2.4.2/lib/
httpi/adapter/net_http.rb:47:in `block in request'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/httpi-2.4.2/lib/
httpi/adapter/net_http.rb:87:in `block in do_request'
        from C:/Ruby23-x64/lib/ruby/2.3.0/net/http.rb:853:in `start'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/httpi-2.4.2/lib/
httpi/adapter/net_http.rb:85:in `do_request'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/httpi-2.4.2/lib/
httpi/adapter/net_http.rb:38:in `request'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/httpi-2.4.2/lib/
httpi.rb:161:in `request'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/httpi-2.4.2/lib/
httpi.rb:133:in `post'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/savon-2.11.1/lib/
savon/operation.rb:94:in `block in call_with_logging'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/savon-2.11.1/lib/
savon/request_logger.rb:12:in `log'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/savon-2.11.1/lib/
savon/operation.rb:94:in `call_with_logging'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/savon-2.11.1/lib/
savon/operation.rb:54:in `call'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/savon-2.11.1/lib/
savon/client.rb:36:in `call'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/easy_upnp-1.1.10/lib
/easy_upnp/control_point/client_wrapper.rb:45:in `call'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/easy_upnp-1.1.10/lib
/easy_upnp/control_point/service_method.rb:31:in `call_method'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/easy_upnp-1.1.10/lib
/easy_upnp/control_point/device_control_point.rb:203:in `block in define
_service_method'
        from c:/yama/bin/UPnP/ContentDirectory.rb:13:in `Browse'
        from ListUpContentDirectory.rb:121:in `dir_exec'
        from ListUpContentDirectory.rb:175:in `block in <main>'
        from ListUpContentDirectory.rb:160:in `loop'
        from ListUpContentDirectory.rb:160:in `<main>'
C:/Ruby23-x64/lib/ruby/2.3.0/net/protocol.rb:140:        raise unless 
ignore_eof