@@ -134,7 +134,9 @@ void SendStreamRst(Socket *sock, int64_t remote_stream_id) {
134134 fm.set_frame_type (FRAME_TYPE_RST);
135135 butil::IOBuf out;
136136 PackStreamMessage (&out, fm, NULL );
137- sock->Write (&out);
137+ Socket::WriteOptions wopt;
138+ wopt.ignore_eovercrowded = true ;
139+ sock->Write (&out, &wopt);
138140}
139141
140142void SendStreamClose (Socket *sock, int64_t remote_stream_id,
@@ -146,19 +148,24 @@ void SendStreamClose(Socket *sock, int64_t remote_stream_id,
146148 fm.set_frame_type (FRAME_TYPE_CLOSE);
147149 butil::IOBuf out;
148150 PackStreamMessage (&out, fm, NULL );
149- sock->Write (&out);
151+ Socket::WriteOptions wopt;
152+ wopt.ignore_eovercrowded = true ;
153+ sock->Write (&out, &wopt);
150154}
151155
152156int SendStreamData (Socket* sock, const butil::IOBuf* data,
153157 int64_t remote_stream_id, int64_t source_stream_id) {
158+ CHECK (sock != NULL );
154159 StreamFrameMeta fm;
155160 fm.set_stream_id (remote_stream_id);
156161 fm.set_source_stream_id (source_stream_id);
157162 fm.set_frame_type (FRAME_TYPE_DATA);
158163 fm.set_has_continuation (false );
159164 butil::IOBuf out;
160165 PackStreamMessage (&out, fm, data);
161- return sock->Write (&out);
166+ Socket::WriteOptions wopt;
167+ wopt.ignore_eovercrowded = true ;
168+ return sock->Write (&out, &wopt);
162169}
163170
164171} // namespace policy
0 commit comments