public void Dispose() { if(this.Id == 0) return; //All server side resources disposed of. KillCursorsMessage kcm = new KillCursorsMessage(this.Id); connection.SendMessage(kcm); this.id = 0; }
public void Dispose() { if(this.Id == 0) return; //All server side resources disposed of. KillCursorsMessage kcm = new KillCursorsMessage(this.Id); try{ this.id = 0; connection.SendMessage(kcm); }catch(IOException ioe){ throw new MongoCommException("Could not read data, communication failure", this.connection,ioe); } }