WatsonTcp: Error when stopping the server and external clients connecting

Hello! When using the .Stop(); Command I get ": Object reference not set to an instance of an object.` I have defined my server to the top of my class as internal static WatsonTcpServer AntVaultServer = new WatsonTcpServer("192.168.1.121", Convert.ToInt32(AuxiliaryServerWorker.ReadFromConfig(true, false)));

It grabs the port number from a config file I have created. I don’t think that this is an error on my code since I have even tried to define the server in a method that takes the server as a constructor, and I get the same error, I hope you can look into it when you have free time on your hands!

EDIT: I also get this error when a computer tries to connect to my server: WatsonTCP.pdb could not be found

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 43

Most upvoted comments

Glad to hear @Antwns glad it’s working for you now. I don’t use discord, but you can reach me via email at joel.christner at gmail. Cheers!

Hi @Antwns any update on your side? Cheers, Joel

Hi @Antwns something to consider - I’d recommend two things as I’m starting to go through your server code:

  1. I’d avoid having any kind of cyclical classes, i.e. you have MainServerWorker calling AuxiliaryServerWorker and vice versa
  2. I’d recommend consolidated these two into an instance class, defining the class in App.xaml.cs, and instantiate in the main window

I’m going to make some suggested changes in the code based on what I’m seeing and post it here. Though I hate to ask you to undergo a major refactor, I think you’ll end up in a better place in the long run, and it will make it easier for me to debug 😃

Hi @Antwns client-side NAT almost universally always automatically does this. Otherwise the Internet would not because the return trip from the server to respond to the client would be broken 😃

I’ll take a look today and believe me I won’t judge or be triggered!

My router is experiencing issues today, and I don’t know why. As soon as I have more info I will get back to you about it, I have setup a DMZ on it but for some reason it stops working after a while…