Commit 7c38ee8f authored by Stephen Morris's avatar Stephen Morris
Browse files

[trac499] Change where client's asynchronous send is waited for

Previously the client sent a message asynchronously to the server and the
server synchronously received it.  Then the code waited for the client send
to complete.  However, this hangs under Solaris.  So now the wait occurs after
the asynchronous send but before the synchronous receive, which Solaris can
apparently cope with.
parent b1bc4d63
......@@ -380,12 +380,13 @@ TEST(TCPSocket, SequenceTest) {
client_cb.length() = 0;
client.asyncSend(OUTBOUND_DATA, sizeof(OUTBOUND_DATA), &server_endpoint, client_cb);
// Wait for the client callback to complete. (Must do this first on
// Solaris: if we do the synchronous read first, the test hangs.)
// Synchronously read the data from the server.;
serverRead(server_socket, server_cb);
// Wait for the client callback to complete.
// Check the client state
EXPECT_EQ(TCPCallback::WRITE, client_cb.called());
EXPECT_EQ(0, client_cb.getCode());
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment