diff options
Diffstat (limited to 'sample')
-rw-r--r-- | sample/soap/calc/server.rb | 6 | ||||
-rw-r--r-- | sample/soap/calc/server2.rb | 6 | ||||
-rw-r--r-- | sample/soap/helloworld/hw_s.rb | 3 |
3 files changed, 13 insertions, 2 deletions
diff --git a/sample/soap/calc/server.rb b/sample/soap/calc/server.rb index 12a3968b5a..97661be9d3 100644 --- a/sample/soap/calc/server.rb +++ b/sample/soap/calc/server.rb @@ -13,5 +13,9 @@ class CalcServer < SOAP::RPC::StandaloneServer end if $0 == __FILE__ - status = CalcServer.new('CalcServer', nil, '0.0.0.0', 7000).start + server = CalcServer.new('CalcServer', nil, '0.0.0.0', 7000) + trap(:INT) do + server.shutdown + end + server.start end diff --git a/sample/soap/calc/server2.rb b/sample/soap/calc/server2.rb index 735721de64..bb0f643d77 100644 --- a/sample/soap/calc/server2.rb +++ b/sample/soap/calc/server2.rb @@ -16,5 +16,9 @@ class CalcServer2 < SOAP::RPC::StandaloneServer end if $0 == __FILE__ - status = CalcServer2.new('CalcServer', 'http://tempuri.org/calcService', '0.0.0.0', 7000).start + server = CalcServer2.new('CalcServer', 'http://tempuri.org/calcService', '0.0.0.0', 7000) + trap(:INT) do + server.shutdown + end + status = server.start end diff --git a/sample/soap/helloworld/hw_s.rb b/sample/soap/helloworld/hw_s.rb index b917f72fc0..f9f819a19f 100644 --- a/sample/soap/helloworld/hw_s.rb +++ b/sample/soap/helloworld/hw_s.rb @@ -13,5 +13,8 @@ end if $0 == __FILE__ server = HelloWorldServer.new('hws', 'urn:hws', '0.0.0.0', 2000) + trap(:INT) do + server.shutdown + end server.start end |