File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -227,6 +227,14 @@ void rc2014Network::write()
227227 rc2014_recv_buffer (response, num_bytes);
228228 rc2014_send_ack ();
229229
230+ // If protocol isn't connected, then return not connected.
231+ if (protocol == nullptr )
232+ {
233+ network_status.error = NETWORK_ERROR_NOT_CONNECTED;
234+ rc2014_send_error ();
235+ return ;
236+ }
237+
230238 *transmitBuffer += string ((char *)response, num_bytes);
231239 err = write_channel (num_bytes);
232240
@@ -254,7 +262,7 @@ void rc2014Network::read()
254262 // If protocol isn't connected, then return not connected.
255263 if (protocol == nullptr )
256264 {
257- network_status.error = NETWORK_ERROR_COULD_NOT_ALLOCATE_BUFFERS ;
265+ network_status.error = NETWORK_ERROR_NOT_CONNECTED ;
258266 rc2014_send_error ();
259267 return ;
260268 }
You can’t perform that action at this time.
0 commit comments