I came across some code like this.
public class ConnectionUtility
{
private static SqlConnection con;
public static SqlConnection GimmeConnection()
{
if(con==null)
con = new SqlConnection();
return con;
}
}
This is in an ASP.NET web application. Can one expect there to be race conditions where one request/page tries to open/close execute things on the connection and other request tries to do those things as well?