Revert 8271 "VirtualSocketServer out-of-order issue with closing..."
Failed on Linux_Memcheck bot. http://chromegw/i/client.webrtc/builders/Linux%20Memcheck/builds/3182 > VirtualSocketServer out-of-order issue with closing TCP sockets > > https://webrtc-codereview.appspot.com/41449004 added a TURN TCP > allocation release test which was disabled as it triggered an assert > in the turnserver. > > This was caused by VirtualSockerServer delivering the last TCP packet > after closing the connection. Calling > VirtualSocketServer::SendTcp > and > VirtualSocket::Close > from TestTurnTCPReleaseAllocation led to the following order of > messages in VirtualSocket::OnMessage: > MSG_ID_DISCONNECT > MSG_ID_PACKET > > This is out of order and triggers an assert in turnserver.cc since the > socket from which the message arrives has already been discarded, > subsequently breaking the test. > > In VirtualSocketServer::Disconnect the MSG_ID_DISCONNECT is posted to the > msg_queue immediately, thus getting ahead of any (slightly delayed) > actual packets. > > Maybe PostAt(network_delay_ + 1, ...) would be better? > > Re-enables TestTurnTCPReleaseAllocation. > > BUG= > R=juberti@webrtc.org > > Review URL: https://webrtc-codereview.appspot.com/34759004 TBR=pthatcher@webrtc.org Review URL: https://webrtc-codereview.appspot.com/38979004 Cr-Commit-Position: refs/heads/master@{#8280} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8280 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
2a44be93e8
commit
95a32ec098
@ -723,9 +723,7 @@ int VirtualSocketServer::Connect(VirtualSocket* socket,
|
||||
bool VirtualSocketServer::Disconnect(VirtualSocket* socket) {
|
||||
if (socket) {
|
||||
// Remove the mapping.
|
||||
// Posted at network_delay_ + 1 so it is scheduled after any
|
||||
// pending packets.
|
||||
msg_queue_->PostAt(network_delay_ + 1, socket, MSG_ID_DISCONNECT);
|
||||
msg_queue_->Post(socket, MSG_ID_DISCONNECT);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -771,7 +771,7 @@ TEST_F(TurnPortTest, TestTurnReleaseAllocation) {
|
||||
}
|
||||
|
||||
// Test that a TURN TCP allocation is released when the port is closed.
|
||||
TEST_F(TurnPortTest, TestTurnTCPReleaseAllocation) {
|
||||
TEST_F(TurnPortTest, DISABLED_TestTurnTCPReleaseAllocation) {
|
||||
turn_server_.AddInternalSocket(kTurnTcpIntAddr, cricket::PROTO_TCP);
|
||||
CreateTurnPort(kTurnUsername, kTurnPassword, kTurnTcpProtoAddr);
|
||||
turn_port_->PrepareAddress();
|
||||
|
Loading…
x
Reference in New Issue
Block a user