aligned_layer
aligned_layer copied to clipboard
fix(batcher): stop closing old sinks during replacements
If a replacement of one proof is successful, we close the old sink and replace it with the new one. This doesn't contemplate the case where the user has more proofs in the queue. By closing the old sink, the user will never receive a response if other proofs were submitted. This can be resolved by simply dropping the old sink without closing it.
Before this fix, we need to refactor our handle_connection function to either read messages within a specified time frame or handle only one message per connection. Otherwise, the socket will remain open until the user closes it.