diff options
Diffstat (limited to 'Login_manager.cs')
-rw-r--r-- | Login_manager.cs | 59 |
1 files changed, 32 insertions, 27 deletions
diff --git a/Login_manager.cs b/Login_manager.cs index c8251b6..dc90613 100644 --- a/Login_manager.cs +++ b/Login_manager.cs | |||
@@ -70,38 +70,43 @@ namespace OpenSim | |||
70 | runLoginProxy.Start(); | 70 | runLoginProxy.Start(); |
71 | } | 71 | } |
72 | 72 | ||
73 | private void RunLoginProxy() { | 73 | private void RunLoginProxy() |
74 | try { | 74 | { |
75 | for (;;) { | 75 | try |
76 | Socket client = loginServer.Accept(); | 76 | { |
77 | IPEndPoint clientEndPoint = (IPEndPoint)client.RemoteEndPoint; | 77 | for (;;) |
78 | { | ||
79 | Socket client = loginServer.Accept(); | ||
80 | IPEndPoint clientEndPoint = (IPEndPoint)client.RemoteEndPoint; | ||
78 | 81 | ||
79 | 82 | ||
80 | NetworkStream networkStream = new NetworkStream(client); | 83 | NetworkStream networkStream = new NetworkStream(client); |
81 | StreamReader networkReader = new StreamReader(networkStream); | 84 | StreamReader networkReader = new StreamReader(networkStream); |
82 | StreamWriter networkWriter = new StreamWriter(networkStream); | 85 | StreamWriter networkWriter = new StreamWriter(networkStream); |
83 | 86 | ||
84 | try | 87 | try |
85 | { | 88 | { |
86 | ProxyLogin(networkReader, networkWriter); | 89 | ProxyLogin(networkReader, networkWriter); |
87 | } | 90 | } |
88 | catch (Exception e) | 91 | catch (Exception e) |
89 | { | 92 | { |
90 | Console.WriteLine(e.Message); | 93 | Console.WriteLine(e.Message); |
91 | } | 94 | } |
92 | 95 | ||
93 | networkWriter.Close(); | 96 | networkWriter.Close(); |
94 | networkReader.Close(); | 97 | networkReader.Close(); |
95 | networkStream.Close(); | 98 | networkStream.Close(); |
96 | 99 | ||
97 | client.Close(); | 100 | client.Close(); |
98 | 101 | ||
99 | // send any packets queued for injection | 102 | // send any packets queued for injection |
100 | 103 | ||
101 | } | 104 | } |
102 | } catch (Exception e) { | 105 | } |
103 | Console.WriteLine(e.Message); | 106 | catch (Exception e) |
104 | Console.WriteLine(e.StackTrace); | 107 | { |
108 | Console.WriteLine(e.Message); | ||
109 | Console.WriteLine(e.StackTrace); | ||
105 | } | 110 | } |
106 | } | 111 | } |
107 | 112 | ||