Changeset d2e0af47 in mainline


Ignore:
Timestamp:
2019-12-05T17:39:17Z (5 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ad211c8
Parents:
c6ac9a55
Message:

Fix exchange leak when async write fails

This lead to deadlock on the session mutex

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/inet/tcp.c

    rc6ac9a55 rd2e0af47  
    455455        exch = async_exchange_begin(conn->tcp->sess);
    456456        aid_t req = async_send_1(exch, TCP_CONN_SEND, conn->id, NULL);
    457 
    458457        rc = async_data_write_start(exch, data, bytes);
     458        async_exchange_end(exch);
     459
    459460        if (rc != EOK) {
    460461                async_forget(req);
    461462                return rc;
    462463        }
    463 
    464         async_exchange_end(exch);
    465464
    466465        if (rc != EOK) {
Note: See TracChangeset for help on using the changeset viewer.