File tree 1 file changed +4
-0
lines changed
packages/pg-gateway/src/auth/sasl
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -159,10 +159,12 @@ export class ScramSha256AuthFlow extends SaslMechanism implements AuthFlow {
159
159
*/
160
160
async getScramSha256Data ( params : { username : string } ) {
161
161
if ( ! this . scramSha256Data ) {
162
+ this . socket . pause ( ) ;
162
163
this . scramSha256Data = await this . auth . getScramSha256Data (
163
164
params ,
164
165
this . connectionState ,
165
166
) ;
167
+ this . socket . resume ( ) ;
166
168
}
167
169
return this . scramSha256Data ;
168
170
}
@@ -278,6 +280,7 @@ export class ScramSha256AuthFlow extends SaslMechanism implements AuthFlow {
278
280
username : this . username ,
279
281
} ) ;
280
282
283
+ this . socket . pause ( ) ;
281
284
const isValid = await this . auth . validateCredentials (
282
285
{
283
286
authMessage,
@@ -287,6 +290,7 @@ export class ScramSha256AuthFlow extends SaslMechanism implements AuthFlow {
287
290
} ,
288
291
this . connectionState ,
289
292
) ;
293
+ this . socket . resume ( ) ;
290
294
291
295
if ( ! isValid ) {
292
296
throw new Error ( 'Invalid credentials' ) ;
You can’t perform that action at this time.
0 commit comments