@@ -47,7 +47,7 @@ JsonLDContentType GetJsonLDContentType(string contentTypeStr)
4747 /// <exception cref="JsonLDNet.Core.JsonLdError"></exception>
4848 public virtual RemoteDocument LoadDocument ( string url )
4949 {
50- return LoadDocumentAsync ( url ) . GetAwaiter ( ) . GetResult ( ) ;
50+ return LoadDocumentAsync ( url ) . ConfigureAwait ( false ) . GetAwaiter ( ) . GetResult ( ) ;
5151 }
5252
5353 /// <exception cref="JsonLDNet.Core.JsonLdError"></exception>
@@ -56,7 +56,7 @@ public virtual async Task<RemoteDocument> LoadDocumentAsync(string url)
5656 RemoteDocument doc = new RemoteDocument ( url , null ) ;
5757 try
5858 {
59- using ( HttpResponseMessage response = await JsonLD . Util . LDHttpClient . FetchAsync ( url ) )
59+ using ( HttpResponseMessage response = await JsonLD . Util . LDHttpClient . FetchAsync ( url ) . ConfigureAwait ( false ) )
6060 {
6161
6262 var code = ( int ) response . StatusCode ;
@@ -88,12 +88,12 @@ public virtual async Task<RemoteDocument> LoadDocumentAsync(string url)
8888 string header = linkedContexts . First ( ) ;
8989 string linkedUrl = header . Substring ( 1 , header . IndexOf ( ">" ) - 1 ) ;
9090 string resolvedUrl = URL . Resolve ( finalUrl , linkedUrl ) ;
91- var remoteContext = this . LoadDocument ( resolvedUrl ) ;
91+ var remoteContext = await this . LoadDocumentAsync ( resolvedUrl ) . ConfigureAwait ( false ) ;
9292 doc . contextUrl = remoteContext . documentUrl ;
9393 doc . context = remoteContext . document ;
9494 }
9595
96- Stream stream = await response . Content . ReadAsStreamAsync ( ) ;
96+ Stream stream = await response . Content . ReadAsStreamAsync ( ) . ConfigureAwait ( false ) ;
9797
9898 doc . DocumentUrl = finalUrl ;
9999 doc . Document = JSONUtils . FromInputStream ( stream ) ;
0 commit comments