My flight to Kolkata at 22:10 finally departed at 6:30 the next day. This delay meant the next day was totally wasted. This week I couldn’t work as much I’d hoped to. I could only manage a total of 3 commits and here are the details-

Connection to Pulse

The tc-events proxy needs to connect to the Pulse server in order to receive messages. One part of the redeployability efforts I talked about in my blog of the first week, was making this server configurable. This introduced two new parameters, hostname and vhost. For internal projects they are pulse.mozilla.org and / respectively. I incorrectly set vhost to 5781 which was actually the port tc-client was using.

With this thing corrected, I could successfully receive messages and verified it by using the test file I created.

Closing remotely

I had used res.on('close',abort()) to end the connection from server side when client terminated abruptly. But the server crashed everytime. Turns out the response object res doesn’t have a close event , the request object req does. So req.on('close', abort()) was the right thing to do. This ensured server handles it smoothly without crashing.

Coming up…

I am leaving for All Hands tomorrow and I wanted to get the above two things done before I leave, so that we can talk about the next steps. It is a pretty long flight. I am very excited to be able to meet Jonas, Dustin and others I have worked with as well as new people. I don’t expect much code to be written in this time, but hope it is a great learning experience. Looking forward to a great week ahead :)