@miconda commented on this pull request.
@@ -169,12 +169,16 @@ int msrp_relay(msrp_frame_t *mf)
wsev.len = p - reqbuf; wsev.id = con->id; evp.data = (void *)&wsev; + tcpconn_put(con); return sr_event_exec(SREV_TCP_WS_FRAME_OUT, &evp); }
I think the code has to be changed to do the `tcpconn_put(con)` after `sr_event_exec(SREV_TCP_WS_FRAME_OUT, &evp);`. Declare `int ret;` at the beginning of the function and then:
``` ret = sr_event_exec(SREV_TCP_WS_FRAME_OUT, &evp); tcpconn_put(con); return ret; ```
I haven't read the code thoroughly, but I expect that if the connection is released before event execution, then it is a risk that the connection is destroyed while executing the event callbacks.