This project has moved. For the latest updates, please go here.
1

Closed

FIXED: TCP Listener Null Exception

description

The problem:
System.NullReferenceException: Object reference not set to an instance of an object.
at ARSoft.Tools.Net.Dns.DnsServer.StartTcpListenerTask() in ARSoft.Tools.Net\Dns\DnsServer.cs:line 372
at ARSoft.Tools.Net.Dns.DnsServer.d__26.MoveNext() in ARSoft.Tools.Net\Dns\DnsServer.cs:line 536

Solution:
The Upd listener had the null check on client, but the tcp listener did not.

FIX:
private void StartTcpListenerTask()
    {
        lock (_listenerLock)
        {
  • if (!_tcpListener.Server.IsBound) // server is stopped
  • if ((_tcpListener.Server == null) || !_tcpListener.Server.IsBound) // server is stopped
                return;
Closed Jun 8, 2016 at 5:48 PM by AlexReinert
Fixed in 2.2.5

comments