ab56da71ce
We can't report the "server already started" error prior to the call to WebSocketTransformer.upgrade(), because it's possible that a different client will successfully establish a connection during the upgrade process. Instead, check after the call to upgrade(). This means that if there is an error, we have to report it via a RequestError object rather than using an HTTP error. When we add stdio as a transport mechanism, this will have the further advantage of allowing the "server already started" error to be detected by code that is independent of the transport mechanism. R=brianwilkerson@google.com Review URL: https://codereview.chromium.org//237793002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35046 260f80e4-7a28-3924-810f-c04153c831b5