I am trying to establish a duplex communication protocol between a FileServer and a ssh client. The client opens two Ssh sessions (in and out) to the FileServer using the NetworkSession for the incoming and outgoing messages. The communication protocol is a custom one (text based).
Everything works fine for a while. Suddenly, when the client sends a command through the out session (Scripting.SendCommand), this command reaches the FileServer (at least the ShellCommand event is fired) after 3 minutes, which, given that both processes are on the same machine, is way too much.
One more thing to note: each session, in and out, has a keep alive timer which is triggered each minute (basically it calls Scripting.KeepAlive()).
What could be the cause for such a behavior? Is is possible that SendCommand and KeepAlive interfere in a bad manner? What can I do (logging?) to further trace the issue?