Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ If you want to test it, do this. Otherwise scroll down for instructions on how t

### Changelog

- v0.2.1
- Fix partial send of outbound packets [#8](https://github.com/localstack/postgresql-proxy/pull/8)
- v0.2.0
- Add support for intercepting [ParameterStatus](https://www.postgresql.org/docs/current/protocol-message-formats.html#PROTOCOL-MESSAGE-FORMATS-PARAMETERSTATUS) responses from Postgres [#7](https://github.com/localstack/postgresql-proxy/pull/7)
- v0.1.2
Expand All @@ -74,4 +76,4 @@ If you want to test it, do this. Otherwise scroll down for instructions on how t
- v0.0.3
- add stop() method to proxy; refactor logging
- v0.0.2
- fix socket file descriptors under Linux
- fix socket file descriptors under Linux
7 changes: 4 additions & 3 deletions postgresql_proxy/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,10 @@ def service_connection(self, key: SelectorKeyProxy, mask):
next_conn = conn.redirect_conn
if next_conn and next_conn.out_bytes:
try:
LOG.debug('sending to %s:\n%s', next_conn.name, next_conn.out_bytes)
sent = next_conn.sock.send(next_conn.out_bytes)
next_conn.sent(sent)
while next_conn.out_bytes:
LOG.debug('sending to %s:\n%s', next_conn.name, next_conn.out_bytes)
sent = next_conn.sock.send(next_conn.out_bytes)
next_conn.sent(sent)
except OSError:
# If one side is closed, close the other one
# this can happen in the case where the client disconnects, and postgres still return a response
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name='postgresql-proxy',
version='0.2.0',
version='0.2.1',
description='Postgresql Proxy',
packages=find_packages(exclude=('tests', 'tests.*')),
install_requires=install_requires,
Expand Down