Fixed crash on upload failure
This commit is contained in:
parent
d80e4454f4
commit
681d8364e2
@ -473,7 +473,7 @@ void Transfer::handle_disconnect(bool write_disconnect) {
|
|||||||
|
|
||||||
auto mode = std::string{write_disconnect ? "write" : "read"};
|
auto mode = std::string{write_disconnect ? "write" : "read"};
|
||||||
if(source && source->stream_index() != source->byte_length()) {
|
if(source && source->stream_index() != source->byte_length()) {
|
||||||
this->call_callback_failed("received " + mode + " disconnect while transmitting data (" + to_string(target->stream_index()) + "/" + to_string(target->expected_length()) + ")");
|
this->call_callback_failed("received " + mode + " disconnect while transmitting data (" + to_string(source->stream_index()) + "/" + to_string(source->byte_length()) + ")");
|
||||||
} else if(target && target->stream_index() != target->expected_length()) {
|
} else if(target && target->stream_index() != target->expected_length()) {
|
||||||
this->call_callback_failed("received " + mode + " disconnect while receiving data (" + to_string(target->stream_index()) + "/" + to_string(target->expected_length()) + ")");
|
this->call_callback_failed("received " + mode + " disconnect while receiving data (" + to_string(target->stream_index()) + "/" + to_string(target->expected_length()) + ")");
|
||||||
} else
|
} else
|
||||||
|
Loading…
Reference in New Issue
Block a user