Browse code

Merge 19714ebaa0f653f65d83025e2d1c033a57f3f9c4 into 97f5f77f2d003a5e32e39aacf8182787a2c83a43

Nacho G authored on 20/10/2021 16:46:28 • GitHub committed on 20/10/2021 16:46:28
Showing 1 changed files
... ...
@@ -169,12 +169,16 @@ done:
169 169
 			wsev.len = p - reqbuf;
170 170
 			wsev.id = con->id;
171 171
 			evp.data = (void *)&wsev;
172
+			tcpconn_put(con);
172 173
 			return sr_event_exec(SREV_TCP_WS_FRAME_OUT, &evp);
173 174
 		}
174 175
 		else if (tcp_send(dst, 0, reqbuf, p - reqbuf) < 0) {
175 176
 			LM_ERR("forwarding frame failed\n");
177
+			tcpconn_put(con);
176 178
 			return -1;
177 179
 		}
180
+
181
+		tcpconn_put(con);
178 182
 	}
179 183
 	else if (tcp_send(dst, 0, reqbuf, p - reqbuf) < 0) {
180 184
 			LM_ERR("forwarding frame failed\n");
... ...
@@ -301,6 +305,7 @@ int msrp_reply(msrp_frame_t *mf, str *code, str *text, str *xhdrs)
301 305
 		wsev.len = p - rplbuf;
302 306
 		wsev.id = con->id;
303 307
 		evp.data = (void *)&wsev;
308
+		tcpconn_put(con);
304 309
 		return sr_event_exec(SREV_TCP_WS_FRAME_OUT, &evp);
305 310
 	}
306 311
 	else