I have encountered the following problem.
I am write a service for windows NT with Delphi 3 C/S. I use some NTService
unit and create a TServerSocket runtime.
I use a Threadblocking methode to spawn new threads for each new connection
to my server. This seems to work fine,
except for the fact that a global variable decleared within th
TServerClientThread wich I want to give the port of the current
connection seems to overwrite the data for this var in all the open threads.
What I mean is that if a second connection is made the variable in the first
connection gets the same value as the variable
in the second (last) connection.
This problem seems to go away when I assign a value to the variable lateron
in the program but that doesn't make verry much
sense to me, because no paticulair thing happen before it that would be able
to solve the problem.
piece of my code:
POP3Thread = class(TServerClientThread)
procedure Execute; override;
var UserPort : integer;
...(loop for receiving commands follows)
Thanx for anny help in advance,