Spring bug causes controller to re-dispatch connections
smithtonson opened this issue · 1 comments
smithtonson commented
There's a race-condition in Spring prior to V4.3.13 that causes methods that return an SseEmitter to re-dispatch after the client disconnects. Upgrading the project to use Spring 4.3.13 should fix this provided that emitter.completeWithError() is not called.
I.e. in SseEventBus.java, lines 294 & 299 should be noop and commented out. (Since the emitter is already completed)
see SPR-16058 and this comment
ralscha commented
Line 294 is a workaround that I needed for Microsoft Edge.
This simply closes the event source connection after each message.