Преглед изворни кода

maint: increase the waiting time for server to start

wangweimin пре 4 година
родитељ
комит
bd214c6ca4
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      pywebio/platform/tornado.py

+ 1 - 1
pywebio/platform/tornado.py

@@ -138,7 +138,7 @@ def webio_handler(applications, allowed_origins=None, check_origin=None):
 
 
 async def open_webbrowser_on_server_started(host, port):
 async def open_webbrowser_on_server_started(host, port):
     url = 'http://%s:%s' % (host, port)
     url = 'http://%s:%s' % (host, port)
-    is_open = await wait_host_port(host, port, duration=5, delay=0.5)
+    is_open = await wait_host_port(host, port, duration=30, delay=0.5)
     if is_open:
     if is_open:
         logger.info('Try open %s in web browser' % url)
         logger.info('Try open %s in web browser' % url)
         webbrowser.open(url)
         webbrowser.open(url)