@@ -116,14 +116,14 @@ private async Task ConnectAsync(string host, int port)
116
116
configRepo . VersionBuild = ( ( IntVariable ) _state . SymbolTable [ PredefinedIdentifiers . VERSION ] . Identifiable ) . Value ;
117
117
118
118
var connectionActions = c . Resolve < INetworkConnectionActions > ( ) ;
119
- var connectResult = await connectionActions . ConnectToServer ( ) ;
119
+ var connectResult = await connectionActions . ConnectToServer ( ) . ConfigureAwait ( false ) ;
120
120
if ( connectResult != ConnectResult . Success )
121
121
throw new ArgumentException ( $ "Bot { _botIndex } : Unable to connect to server! Host={ host } Port={ port } ") ;
122
122
123
123
var backgroundReceiveActions = c . Resolve < IBackgroundReceiveActions > ( ) ;
124
124
backgroundReceiveActions . RunBackgroundReceiveLoop ( ) ;
125
125
126
- var handshakeResult = await connectionActions . BeginHandshake ( _random . Next ( Constants . MaxChallenge ) ) ;
126
+ var handshakeResult = await connectionActions . BeginHandshake ( _random . Next ( Constants . MaxChallenge ) ) . ConfigureAwait ( false ) ;
127
127
128
128
if ( handshakeResult . ReplyCode != InitReply . Ok )
129
129
throw new InvalidOperationException ( $ "Bot { _botIndex } : Invalid response from server or connection failed! Must receive an OK reply.") ;
@@ -149,38 +149,38 @@ private void Disconnect()
149
149
150
150
private async Task < int > CreateAccountAsync ( string user , string pass )
151
151
{
152
- return ( int ) await _botHelper . CreateAccountAsync ( user , pass ) ;
152
+ return ( int ) await _botHelper . CreateAccountAsync ( user , pass ) . ConfigureAwait ( false ) ;
153
153
}
154
154
155
155
private async Task < int > LoginAsync ( string user , string pass )
156
156
{
157
- return ( int ) await _botHelper . LoginToAccountAsync ( user , pass ) ;
157
+ return ( int ) await _botHelper . LoginToAccountAsync ( user , pass ) . ConfigureAwait ( false ) ;
158
158
}
159
159
160
160
private async Task < int > CreateAndLoginAsync ( string user , string pass )
161
161
{
162
- var accountReply = ( AccountReply ) await CreateAccountAsync ( user , pass ) ;
162
+ var accountReply = ( AccountReply ) await CreateAccountAsync ( user , pass ) . ConfigureAwait ( false ) ;
163
163
if ( accountReply == AccountReply . Created || accountReply == AccountReply . Exists )
164
164
{
165
- return await LoginAsync ( user , pass ) ;
165
+ return await LoginAsync ( user , pass ) . ConfigureAwait ( false ) ;
166
166
}
167
167
168
168
return ( int ) LoginReply . WrongUser ;
169
169
}
170
170
171
171
private async Task < int > ChangePasswordAsync ( string user , string oldPass , string newPass )
172
172
{
173
- return ( int ) await _botHelper . ChangePasswordAsync ( user , oldPass , newPass ) ;
173
+ return ( int ) await _botHelper . ChangePasswordAsync ( user , oldPass , newPass ) . ConfigureAwait ( false ) ;
174
174
}
175
175
176
176
private async Task < int > CreateCharacterAsync ( string charName )
177
177
{
178
- return ( int ) await _botHelper . CreateCharacterAsync ( charName ) ;
178
+ return ( int ) await _botHelper . CreateCharacterAsync ( charName ) . ConfigureAwait ( false ) ;
179
179
}
180
180
181
181
private async Task < int > DeleteCharacterAsync ( string charName , bool force )
182
182
{
183
- return ( int ) await _botHelper . DeleteCharacterAsync ( charName , force ) ;
183
+ return ( int ) await _botHelper . DeleteCharacterAsync ( charName , force ) . ConfigureAwait ( false ) ;
184
184
}
185
185
186
186
private Task LoginToCharacterAsync ( string charName )
0 commit comments