ServerSentEvents off by one event

23 views
Skip to first unread message

Matthew Smith

unread,
Nov 14, 2012, 1:05:01 PM11/14/12
to fubumv...@googlegroups.com
So we have been having an interesting problem where all events are immediately sent down to the client. I was digging into it this morning and found that the problem was rooted within System.Web. The System.Web.HttpResponse.Flush method is async, however the async nature of that method is not exposed until .Net 4.5. So the issue is that if you have two events where the second follows immediately, the flush method will return without doing anything. No errors, no boolean flag, nothing. .Net 4.5 adds two methods BeginFlush and EndFlush which exposes this async issue that we could use to fix this off by one error. I don't see any way around this problem for now, but wanted to let the group know about it.

I know support for .Net 4.5 is not on the roadmap for a 1.0 release, but what is the goal for supporting .Net 4.5?

Matt Smith

Jeremy D. Miller

unread,
Nov 15, 2012, 8:48:31 AM11/15/12
to fubumv...@googlegroups.com
This is a can of worms, but I suppose we could try to multi-target FubuMVC by publishing both a .net 4.5 and 4.0 assembly in the nuget.  Makes the build process instantly more complicated and adds conditional code to the project, but there it is.




--
You received this message because you are subscribed to the Google Groups "FubuMVC Development Group" group.
To view this discussion on the web visit https://groups.google.com/d/msg/fubumvc-devel/-/aqPtWCwuFZoJ.
To post to this group, send email to fubumv...@googlegroups.com.
To unsubscribe from this group, send email to fubumvc-deve...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/fubumvc-devel?hl=en.

Reply all
Reply to author
Forward
0 new messages