mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 22:11:14 +02:00
Try to improve error reporting when streaming a PCAP file. Ref #2235.
This commit is contained in:
1 parent
ee486b32bd
commit
c22229101f
2 files changed
+12
-1
No files matched your search
@@ -290,7 +290,12 @@ class Link:
|
||||
Dump a pcap file on disk
|
||||
"""
|
||||
|
||||
stream_content = yield from self.read_pcap_from_source()
|
||||
try:
|
||||
stream_content = yield from self.read_pcap_from_source()
|
||||
except aiohttp.web.HTTPException as e:
|
||||
log.error("Could not stream pcap file: error {}: {}".format(e.status, e.text))
|
||||
self._capturing = False
|
||||
self._project.controller.notification.emit("link.updated", self.__json__())
|
||||
with stream_content as stream:
|
||||
with open(self.capture_file_path, "wb+") as f:
|
||||
while self._capturing:
|
||||
|
||||
Reference in new issue
Block a user