• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

shogi-server source


Commit MetaInfo

Revisão23b86a817f3f84768ef05872c5176cb4e7fc6165 (tree)
Hora2020-12-14 20:42:55
AutorMizar <mizar.jp@gmai...>
CommiterMizar

Mensagem de Log

ignore second select (for windows issue)

Mudança Sumário

Diff

--- a/bin/usiToCsa.rb
+++ b/bin/usiToCsa.rb
@@ -717,7 +717,7 @@ end
717717 #
718718 def main_loop
719719 while true
720- ret, = select([$server, $engine], nil, nil, 60)
720+ ret, = select([$engine, $server], nil, nil, 60)
721721 unless ret
722722 # Send keep-alive
723723 if $bridge_state.too_quiet?
@@ -727,13 +727,13 @@ def main_loop
727727 next
728728 end
729729
730- ret.each do |io|
731- case io
732- when $engine
733- $bridge_state.do_engine_recv
734- when $server
735- $bridge_state.do_sever_recv
736- end
730+ # Ignore false notifications that both $engine and $server are available,
731+ # even if $server has no incoming data (Occurs on Windows)
732+ case ret[0]
733+ when $engine
734+ $bridge_state.do_engine_recv
735+ when $server
736+ $bridge_state.do_sever_recv
737737 end
738738
739739 if $bridge_state.GAME_END?
@@ -745,7 +745,7 @@ def main_loop
745745
746746 if $engine.nil?
747747 $engine.close
748- $engile = nil
748+ $engine = nil
749749 end
750750
751751 if $server.nil?