mirror of
https://github.com/schoebel/mars
synced 2025-02-17 12:37:20 +00:00
net: fix crash on deleted server socket
Once a connection is bad, stop sending messages.
Seems to be a regression from 03803ee
This commit is contained in:
parent
4dafa9467a
commit
bd458a93c5
@ -77,9 +77,11 @@ int cb_thread(void *data)
|
||||
status = -EINVAL;
|
||||
CHECK_PTR(mref, err);
|
||||
|
||||
down(&brick->socket_sem);
|
||||
status = mars_send_cb(sock, mref);
|
||||
up(&brick->socket_sem);
|
||||
if (!aborted) {
|
||||
down(&brick->socket_sem);
|
||||
status = mars_send_cb(sock, mref);
|
||||
up(&brick->socket_sem);
|
||||
}
|
||||
|
||||
err:
|
||||
if (unlikely(status < 0) && !aborted) {
|
||||
|
Loading…
Reference in New Issue
Block a user