Skip to content

Commit

Permalink
Merge branch 'master' of github.com:LearnBoost/socket.io-client
Browse files Browse the repository at this point in the history
  • Loading branch information
rauchg committed Oct 27, 2011
2 parents ec5d965 + dde633b commit e2e8787
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -169,7 +169,7 @@ true

Adds a one time listener for the event *event*. The listener is removed after the first time the event is fired.

- *removeEvent(event, λ)*
- *removeListener(event, λ)*

Removes the listener λ for the event *event*.

Expand Down
9 changes: 7 additions & 2 deletions lib/transport.js
@@ -1,4 +1,3 @@

/**
* socket.io
* Copyright(c) 2011 LearnBoost <dev@learnboost.com>
Expand Down Expand Up @@ -42,7 +41,13 @@

Transport.prototype.onData = function (data) {
this.clearCloseTimeout();
this.setCloseTimeout();

// If the connection in currently open (or in a reopening state) reset the close
// timeout since we have just received data. This check is necessary so
// that we don't reset the timeout on an explicitly disconnected connection.
if (this.connected || this.connecting || this.reconnecting) {
this.setCloseTimeout();
}

if (data !== '') {
// todo: we should only do decodePayload for xhr transports
Expand Down

0 comments on commit e2e8787

Please sign in to comment.