Changeset 748
- Timestamp:
- 12/6/2008 8:25:58 AM (4 years ago)
- File:
-
- 1 edited
-
branches/eraser6/Manager/RemoteExecutor.cs (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/Manager/RemoteExecutor.cs
r744 r748 134 134 { 135 135 IAsyncResult asyncWait = server.BeginWaitForConnection( 136 server.EndWaitForConnection, null);136 EndWaitForConnection, null); 137 137 while (!server.IsConnected && !asyncWait.AsyncWaitHandle.WaitOne(15)) 138 138 if (Thread.CurrentThread.ThreadState == ThreadState.AbortRequested) … … 164 164 //Deserialise the header of the request. 165 165 mstream.Position = 0; 166 request = (RemoteRequest)new BinaryFormatter().Deserialize(new MemoryStream(buffer)); 166 try 167 { 168 request = (RemoteRequest)new BinaryFormatter().Deserialize( 169 new MemoryStream(buffer)); 170 } 171 catch (SerializationException) 172 { 173 //We got a unserialisation issue but we can't do anything about it. 174 continue; 175 } 167 176 } 168 177 … … 290 299 } 291 300 292 // we are done, disconnect301 //We are done, disconnect 293 302 server.Disconnect(); 294 303 } 304 } 305 306 /// <summary> 307 /// Waits for a connection from a client. 308 /// </summary> 309 /// <param name="result">The AsyncResult object associated with this asynchronous 310 /// operation.</param> 311 private void EndWaitForConnection(IAsyncResult result) 312 { 313 server.WaitForConnection(); 314 if (server.IsConnected) 315 server.EndWaitForConnection(result); 295 316 } 296 317 }
Note: See TracChangeset
for help on using the changeset viewer.
