Commit Graph

10 Commits

Author SHA1 Message Date
David Zhao
a705a5f294 Minor fix: incorrect log format in TCPMux
%w isn't a correct formatting string for error types.
2022-10-06 22:38:25 -07:00
cnderrauber
93980395c8 Fix muxed conn shared by candidate
When we have multiple host candidates and mux to a
single port, if these candidates share a same conn
(either tcp or udp), they might read other's msg
cause ice connection cost long time or failed.
2022-09-26 09:26:23 +08:00
Kevin Caffrey
5475fdb796 Attempt to fix deadlock in TCPMux
Previously `(*TCPMux).RemoveConnByUfrag` would close the connections
while holding its lock, but it is possible for closing to block
and/or take a while.

If closing one of the connections blocks (which was occurring rarely
due to blocking on a channel send), then the entire `TCPMux` would
deadlock and all further operations with the ICE agent would end
up getting blocked due to tying up the task loop.

This change should help matters, but it's unclear if
`(*TCPMux).RemoveConnByUfrag` somehow needs to be made cancelable by
`Agent`'s task context, as there are no guarantees that closing
a connection will happen quickly.
2022-09-17 09:40:57 -04:00
cnderrauber
90dc7280e2 Add nonblock write option to TCPMux
add nonblock write option for sfu broadcast don't want
slow connetion affect other clients.
2022-07-20 14:33:39 +08:00
Steffen Vogel
e32a520e4c Do not use newlines in logging statements
A newline is automatically added by the DefaultLeveledLogger.
The current code-base used a mix of log statements w/o endlines.
This is misleading for custom loggers.
2022-05-08 22:53:42 -04:00
David Zhao
b73472ee7e Reduce critical section when writing with TCPMux
To avoid one bad connection causing locked processes/cascading failures.
2022-04-05 23:25:38 -07:00
Pion
d3e1775d73 Update CI configs to v0.4.7
Update lint scripts and CI configs.
2020-09-26 08:54:24 -07:00
Jerko Steiner
fa49161dd0 Close TCP recvChan after all writes have completed
Closes #260
2020-08-09 13:55:49 +02:00
Jerko Steiner
3b9a989177 Remove global state for ICE TCP
This addresses a few points issue of #245:

 - Take a net.Listener instead of having global state
 - Expose a net.TCPMux based API

Also, the unused closeChannel was removed from tcp_mux.go

Closes #253.
2020-08-01 09:28:28 +02:00
Jerko Steiner
12f44e93f1 Add support for passive ICE TCP candidate
Closes #196
2020-07-15 07:51:55 +02:00