Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Issue 237793002: Fix race condition with "server already started" error. (Closed)

Created:
6 years, 8 months ago by Paul Berry
Modified:
6 years, 8 months ago
Reviewers:
jwren, Brian Wilkerson
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Fix race condition with "server already started" error. 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 Committed: https://code.google.com/p/dart/source/detail?r=35046

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -16 lines) Patch
M pkg/analysis_server/lib/http_server.dart View 4 chunks +12 lines, -16 lines 1 comment Download
M pkg/analysis_server/lib/src/protocol.dart View 2 chunks +13 lines, -0 lines 0 comments Download
M pkg/analysis_server/test/protocol_test.dart View 2 chunks +8 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Paul Berry
6 years, 8 months ago (2014-04-14 21:09:39 UTC) #1
Brian Wilkerson
LGTM https://codereview.chromium.org/237793002/diff/1/pkg/analysis_server/lib/http_server.dart File pkg/analysis_server/lib/http_server.dart (right): https://codereview.chromium.org/237793002/diff/1/pkg/analysis_server/lib/http_server.dart#newcode15 pkg/analysis_server/lib/http_server.dart:15: import 'package:analysis_server/src/protocol.dart'; nit: I believe that we're generally ...
6 years, 8 months ago (2014-04-14 21:25:43 UTC) #2
Paul Berry
Committed patchset #1 manually as r35046 (presubmit successful).
6 years, 8 months ago (2014-04-14 22:13:15 UTC) #3
jwren
6 years, 8 months ago (2014-04-14 22:17:43 UTC) #4
Message was sent while issue was closed.
On 2014/04/14 21:25:43, Brian Wilkerson wrote:
> LGTM
> 
>
https://codereview.chromium.org/237793002/diff/1/pkg/analysis_server/lib/http...
> File pkg/analysis_server/lib/http_server.dart (right):
> 
>
https://codereview.chromium.org/237793002/diff/1/pkg/analysis_server/lib/http...
> pkg/analysis_server/lib/http_server.dart:15: import
> 'package:analysis_server/src/protocol.dart';
> nit: I believe that we're generally keeping the imports in alphabetic order.

LGTM

Powered by Google App Engine
This is Rietveld 408576698