oldrev / maltreport

A WYSIWYG document template engine to generates .odt/.ods/docx/xlsx/doc/xls documents for .NET
MIT License
125 stars 27 forks source link

Thread deadlocking #16

Closed ayaka209 closed 6 years ago

ayaka209 commented 6 years ago

AbstractZipDocument.cs Line 21: this.OnLoadAsync(inStream).GetAwaiter().GetResult(); may lead to thread deadlock in some cases,

can be changed to Task.Run(()=> this.OnLoadAsync(inStream)).Wait();

to avoid problem.

ayaka209 commented 6 years ago

public override void Save(Stream outStream) => this.SaveAsync(outStream).GetAwaiter().GetResult();

should be fixed too.

oldrev commented 6 years ago

PR are always welcome :)

oldrev commented 6 years ago

Fixed by commit df67d161477cd5d3c879721ef68b4630c5408615