Skip to content

Commit c8d1296

Browse files
fix: improve proxy SSL resilience under fragmented TCP delivery
1 parent 7a5f6e9 commit c8d1296

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

postgresql_proxy/proxy.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,10 @@ def service_connection(self, key: SelectorKeyProxy, mask):
263263
# A file object shall be unregistered prior to being closed.
264264
sock.close()
265265
return
266+
except ssl.SSLWantReadError:
267+
# Partial TLS record received; the selector will fire again when the
268+
# remaining bytes of the record arrive. Do not treat this as a disconnect.
269+
pass
266270
except OSError as e:
267271
# it means the socket was closed by peer
268272
LOG.debug(

0 commit comments

Comments
 (0)