Changeset: 750bc78d3d51 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/750bc78d3d51 Modified Files: sql/backends/monet5/sql_scenario.c Branch: default Log Message:
Avoid going into a pointless loop when client closes the connection When the client closed the connection the server would keep sending prompts hoping to get more input from the client. This repeated until the socket buffers filled up and the socket write would start to return errors. diffs (12 lines): diff --git a/sql/backends/monet5/sql_scenario.c b/sql/backends/monet5/sql_scenario.c --- a/sql/backends/monet5/sql_scenario.c +++ b/sql/backends/monet5/sql_scenario.c @@ -1063,7 +1063,7 @@ SQLreader(Client c, backend *be) more = false; go = false; } else if (go && (rd = bstream_next(in)) <= 0) { - if (rd == 0 && in->eof) { + if (rd == 0 && in->eof && !mnstr_eof(in->s)) { /* we hadn't seen the EOF before, so just try again (this time with prompt) */ more = true; _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org