Skip to content

Commit

Permalink
TEIID-5014: Unable to use parameterized query with node pg module and…
Browse files Browse the repository at this point in the history
… Teiid/JBoss VDB (fix for node.js prepared statements)
  • Loading branch information
shawkins authored and jolee committed Sep 25, 2017
1 parent 7906b0b commit 3e93fc5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions runtime/src/main/java/org/teiid/transport/PgBackendProtocol.java
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,11 @@ public void terminated() {
public void flush() {
this.dataOut = null;
this.writer = null;
Channels.write(this.ctx.getChannel(), null);
try {
((OutputStreamWriter) this.ctx).flush();
} catch (IOException e){
LogManager.logError(LogConstants.CTX_ODBC, e, "channel being flushed - ");
}
}

@Override
Expand All @@ -429,8 +433,8 @@ public void emptyQueryReceived() {
}

private void terminate(Throwable t) {
trace("channel being terminated - ", t.getMessage());
this.ctx.getChannel().close();
LogManager.logDetail(LogConstants.CTX_ODBC, "channel being terminated - ", t.getMessage());
this.ctx.getChannel().close();
}

private void sendEmptyQueryResponse() {
Expand Down

0 comments on commit 3e93fc5

Please sign in to comment.