synchronize Server/Scripts project properties

whitespace/comment changes in Serialization.cs and ScriptCompiler.cs
proper dispose pattern for Listener
remove IDisposable from FileLogger
This commit is contained in:
Mark Sturgill 2014-02-25 14:00:32 -07:00
parent abe9f5acb2
commit 83bf81b7ee
6 changed files with 21 additions and 12 deletions

View file

@ -267,12 +267,22 @@ namespace Server.Network
return array;
}
public void Dispose() {
Socket socket = Interlocked.Exchange<Socket>( ref m_Listener, null );
public void Dispose(bool disposing)
{
if (disposing)
{
Socket socket = Interlocked.Exchange<Socket>(ref m_Listener, null);
if ( socket != null ) {
socket.Close();
if (socket != null)
{
socket.Close();
}
}
}
public void Dispose() {
Dispose(true);
GC.SuppressFinalize(this);
}
}
}