Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
23c52fc7
Commit
23c52fc7
authored
Oct 20, 2016
by
John McCutchan
Committed by
GitHub
Oct 20, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle errors thrown while doing a DevFS sync via HTTP PUT. (#6434)
parent
1b2049ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
devfs.dart
packages/flutter_tools/lib/src/devfs.dart
+13
-9
No files found.
packages/flutter_tools/lib/src/devfs.dart
View file @
23c52fc7
...
...
@@ -222,15 +222,19 @@ class _DevFSHttpWriter {
Future
<
Null
>
_scheduleWrite
(
DevFSEntry
entry
,
DevFSProgressReporter
progressReporter
)
async
{
HttpClientRequest
request
=
await
_client
.
putUrl
(
httpAddress
);
request
.
headers
.
removeAll
(
HttpHeaders
.
ACCEPT_ENCODING
);
request
.
headers
.
add
(
'dev_fs_name'
,
fsName
);
request
.
headers
.
add
(
'dev_fs_path_b64'
,
BASE64
.
encode
(
UTF8
.
encode
(
entry
.
devicePath
)));
Stream
<
List
<
int
>>
contents
=
entry
.
contentsAsCompressedStream
();
await
request
.
addStream
(
contents
);
HttpClientResponse
response
=
await
request
.
close
();
await
response
.
drain
();
try
{
HttpClientRequest
request
=
await
_client
.
putUrl
(
httpAddress
);
request
.
headers
.
removeAll
(
HttpHeaders
.
ACCEPT_ENCODING
);
request
.
headers
.
add
(
'dev_fs_name'
,
fsName
);
request
.
headers
.
add
(
'dev_fs_path_b64'
,
BASE64
.
encode
(
UTF8
.
encode
(
entry
.
devicePath
)));
Stream
<
List
<
int
>>
contents
=
entry
.
contentsAsCompressedStream
();
await
request
.
addStream
(
contents
);
HttpClientResponse
response
=
await
request
.
close
();
await
response
.
drain
();
}
catch
(
e
,
stackTrace
)
{
printError
(
'Error writing "
${entry.devicePath}
" to DevFS:
$e
\n
$stackTrace
'
);
}
if
(
progressReporter
!=
null
)
{
_done
++;
progressReporter
(
_done
,
_max
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment