Skip to content

Commit f81416c

Browse files
authored
Update RpcQueryMessageFlow.java to fix the issue r2dbc#276
1 parent 3449c84 commit f81416c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/io/r2dbc/mssql/RpcQueryMessageFlow.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ static Flux<Message> exchange(PreparedStatementCache statementCache, Client clie
262262
state.update(message);
263263

264264
if (message instanceof ErrorToken) {
265-
if (isPreparedStatementNotFound(((ErrorToken) message).getNumber()) && retryReprepare.compareAndSet(true, false)) {
265+
if (retryReprepare.compareAndSet(true, false)) {
266266
logger.debug("Prepared statement no longer valid: {}", handle);
267267
state.update(Phase.PREPARE_RETRY);
268268
}
@@ -304,7 +304,7 @@ static Flux<Message> exchange(PreparedStatementCache statementCache, Client clie
304304
* @return
305305
*/
306306
private static boolean isPreparedStatementNotFound(long errorNumber) {
307-
return errorNumber == 8179 || errorNumber == 586;
307+
return errorNumber == 8179 || errorNumber == 586 || errorNumber == 8144 || errorNumber == 8178 ;
308308
}
309309

310310
private static boolean handleSpCursorReturnValue(PreparedStatementCache statementCache, Codecs codecs, String query, Binding binding, CursorState state, boolean needsPrepare,

0 commit comments

Comments
 (0)