You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If servers close all their connections to proxy, em-proxy immediately close (after writing currently written data) the connection to client too:
def unbind_backend(name)
debug [:unbind_backend, name]
@servers[name] = nil
# if all connections are terminated downstream, then notify client
close_connection_after_writing if @servers.values.compact.size.zero?
if @on_finish
@on_finish.call(name)
# not sure if this is required
# @on_finish.call(:done) if @servers.values.compact.size.zero?
end
end
Problem occurs in cases, when we have some data from downstream in processing and server close the connection before our data for client is prepared for send. At these cases we need to say, we don't want to close connection to client just now, but manually later.
Some appropriate solution can be for example something similar to:
def unbind_backend(name)
debug [:unbind_backend, name]
@servers[name] = nil
close = :close
if @on_finish
close = @on_finish.call(name)
end
# if all connections are terminated downstream, then notify client
if @servers.values.compact.size.zero? and close != :keep
close_connection_after_writing
end
end
The text was updated successfully, but these errors were encountered:
If servers close all their connections to proxy, em-proxy immediately close (after writing currently written data) the connection to client too:
Problem occurs in cases, when we have some data from downstream in processing and server close the connection before our data for client is prepared for send. At these cases we need to say, we don't want to close connection to client just now, but manually later.
Some appropriate solution can be for example something similar to:
The text was updated successfully, but these errors were encountered: