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
{{ message }}
Repository navigation
GsonHttpMessageConverter cannot be used in an SseEmitter because it closes the response stream [SPR-16529] #21072
in: webIssues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug
GsonHttpMessageConverter cannot be used in an SseEmitter (unlike MappingJackson2HttpMessageConverter) because it closes the output stream after every element, committing the HTTP response and shutting it down in the servlet container. To verify this you only need to build an app with Jackson and an SseEmitter, then switch to Gson and see it break (only the first event is emitted).
in: webIssues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug
Activity
spring-projects-issues commentedon Feb 23, 2018
Dave Syer commented
Changing
writer.close()towriter.flush()inwriteInternal()works for me.