Chromium Code Reviews| Index: net/socket/ssl_client_socket_mac.cc |
| =================================================================== |
| --- net/socket/ssl_client_socket_mac.cc (revision 21838) |
| +++ net/socket/ssl_client_socket_mac.cc (working copy) |
| @@ -736,10 +736,21 @@ |
| return status; |
| } |
| + bool send_pending = !us->send_buffer_.empty(); |
| + |
| if (data) |
| us->send_buffer_.insert(us->send_buffer_.end(), |
| static_cast<const char*>(data), |
| static_cast<const char*>(data) + *data_length); |
| + |
| + if (send_pending) { |
| + // If we have I/O in flight, just add the data to the end of the buffer and |
| + // return to our caller. The existing callback will trigger the write of the |
| + // new data when it sees that data remains in the buffer after removing the |
| + // sent data. |
| + return noErr; |
|
wtc
2009/07/29 18:05:17
Perhaps you can reproduce the "always lie to our c
Avi (use Gerrit)
2009/07/29 18:22:41
Sure.
We can't return would-block. The caller wan
|
| + } |
| + |
| int rv; |
| do { |
| scoped_refptr<IOBuffer> buffer = new IOBuffer(us->send_buffer_.size()); |