I would getClient() right after. You wont use it, but at least it will be
up.

Else, maybe just not use that, and have the deletion happen in the close
method?


On Tue, Sep 3, 2013 at 5:53 PM, Ron Korving <notifications@github.com>wrote:

> In graylog.js:
>
> > @@ -37,6 +33,25 @@ graylog.prototype.getServer = function () {
> >      return this.servers[this._callCount++ % this.servers.length];
> >  };
> >
> > +graylog.prototype.getClient = function () {
> > +    if (!this.client) {
> > +        this.client = dgram.createSocket("udp4");
> > +    }
> > +
> > +    return this.client;
> > +};
> > +
> > +graylog.prototype.close = function () {
> > +    if (this.client) {
> > +        this.client.close();
> > +    }
> > +};
> > +
> > +graylog.prototype.reopen = function () {
>
> Good point. Suggestions?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/Wizcorp/node-graylog2/pull/1/files#r6120189>
> .
>



-- 
<http://www.wizcorp.jp/>Marc Trudel-Belisle
Chief Technology Officer | Wizcorp Inc. <http://www.wizcorp.jp/>
------------------------------
TECH . GAMING . OPEN-SOURCE WIZARDS+ 81
3-4550-1448|Website<http://www.wizcorp.jp/>
|Twitter <https://twitter.com/Wizcorp>|Facebook<http://www.facebook.com/Wizcorp>
|LinkedIn <http://www.linkedin.com/company/wizcorp>