jellyfin-plugin-tvheadend icon indicating copy to clipboard operation
jellyfin-plugin-tvheadend copied to clipboard

Set a limit of connection attempts

Open 97carmine opened this issue 5 years ago • 0 comments

When Jellyfin tries to connect to the server Tvheadend and the server Tvheadend is not available, as seen in the log, every two seconds tries to establish a connection for an infinite time, which generates records in the log all the time and it does not end until the connection with the Tvheadend server is established.

It would be a good option to set a limit of connection attempts to avoid creating very large log records with this type of error.

This is an example:

[2019-05-02 13:13:41.667 +02:00] [INF] [TVHclient] HTSConnectionAsync.open: IPEndPoint = '"192.168.1.10:9982"'; AddressFamily = 'InterNetwork'
[2019-05-02 13:13:41.668 +02:00] [ERR] [TVHclient] HTSConnectionAsync.open: caught exception
System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (111): Connection refused 192.168.1.10:9982
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
   at TVHeadEnd.HTSP.HTSConnectionAsync.open(String hostname, Int32 port)
[2019-05-02 13:13:43.668 +02:00] [INF] [TVHclient] HTSConnectionAsync.open: IPEndPoint = '"192.168.1.10:9982"'; AddressFamily = 'InterNetwork'
[2019-05-02 13:13:43.668 +02:00] [ERR] [TVHclient] HTSConnectionAsync.open: caught exception
System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (111): Connection refused 192.168.1.10:9982
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
   at TVHeadEnd.HTSP.HTSConnectionAsync.open(String hostname, Int32 port)
[2019-05-02 13:13:45.669 +02:00] [INF] [TVHclient] HTSConnectionAsync.open: IPEndPoint = '"192.168.1.10:9982"'; AddressFamily = 'InterNetwork'
[2019-05-02 13:13:45.669 +02:00] [ERR] [TVHclient] HTSConnectionAsync.open: caught exception
System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (111): Connection refused 192.168.1.10:9982
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
   at TVHeadEnd.HTSP.HTSConnectionAsync.open(String hostname, Int32 port)
[2019-05-02 13:13:47.670 +02:00] [INF] [TVHclient] HTSConnectionAsync.open: IPEndPoint = '"192.168.1.10:9982"'; AddressFamily = 'InterNetwork'
[2019-05-02 13:13:47.670 +02:00] [ERR] [TVHclient] HTSConnectionAsync.open: caught exception
System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (111): Connection refused 192.168.1.10:9982
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
   at TVHeadEnd.HTSP.HTSConnectionAsync.open(String hostname, Int32 port)
[2019-05-02 13:13:49.670 +02:00] [INF] [TVHclient] HTSConnectionAsync.open: IPEndPoint = '"192.168.1.10:9982"'; AddressFamily = 'InterNetwork'
[2019-05-02 13:13:49.671 +02:00] [ERR] [TVHclient] HTSConnectionAsync.open: caught exception
System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (111): Connection refused 192.168.1.10:9982
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
   at TVHeadEnd.HTSP.HTSConnectionAsync.open(String hostname, Int32 port)
[2019-05-02 13:13:51.671 +02:00] [INF] [TVHclient] HTSConnectionAsync.open: IPEndPoint = '"192.168.1.10:9982"'; AddressFamily = 'InterNetwork'
[2019-05-02 13:13:51.671 +02:00] [ERR] [TVHclient] HTSConnectionAsync.open: caught exception
System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (111): Connection refused 192.168.1.10:9982

97carmine avatar May 02 '19 11:05 97carmine