mirror of
https://github.com/GNS3/gns3-server
synced 2025-01-13 01:20:58 +00:00
parent
c9ceeee9de
commit
8b9f22c30c
@ -20,10 +20,10 @@ Docker server module.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
import json
|
||||||
import asyncio
|
import asyncio
|
||||||
import logging
|
import logging
|
||||||
import aiohttp
|
import aiohttp
|
||||||
import json
|
|
||||||
from gns3server.utils import parse_version
|
from gns3server.utils import parse_version
|
||||||
from gns3server.utils.asyncio import locked_coroutine
|
from gns3server.utils.asyncio import locked_coroutine
|
||||||
from gns3server.compute.base_manager import BaseManager
|
from gns3server.compute.base_manager import BaseManager
|
||||||
@ -189,7 +189,10 @@ class Docker(BaseManager):
|
|||||||
# The pull api will stream status via an HTTP JSON stream
|
# The pull api will stream status via an HTTP JSON stream
|
||||||
content = ""
|
content = ""
|
||||||
while True:
|
while True:
|
||||||
|
try:
|
||||||
chunk = yield from response.content.read(1024)
|
chunk = yield from response.content.read(1024)
|
||||||
|
except aiohttp.errors.ServerDisconnectedError:
|
||||||
|
break
|
||||||
if not chunk:
|
if not chunk:
|
||||||
break
|
break
|
||||||
content += chunk.decode("utf-8")
|
content += chunk.decode("utf-8")
|
||||||
|
Loading…
Reference in New Issue
Block a user